Bug 27287 - RemoteEndPoint null after creating socket using new Socket(SocketInformation)
Summary: RemoteEndPoint null after creating socket using new Socket(SocketInformation)
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: 3.12.0
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-22 12:46 UTC by Size43
Modified: 2015-02-22 12:46 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
A file demonstrating the problem. Remove the commented call FixNull to make it work as intended on mono. (1.66 KB, text/plain)
2015-02-22 12:46 UTC, Size43
Details

Description Size43 2015-02-22 12:46:24 UTC
Created attachment 9962 [details]
A file demonstrating the problem. Remove the commented call FixNull to make it work as intended on mono.

When creating a new Socket using new Socket(SocketInformation), the RemoteEndPoint property will be null, even if the socket is connected.

I believe this is because seed_endpoint is never set to anything when using the new Socket(SocketInformation) constructor. In the attached file, I've added a method "FixNull" that sets the seed_endpoint field of the socket object to new IPEndPoint(0, 0). If this method is called (remove the commented line), RemoteEndPoint no longer returns null.

Note You need to log in before you can comment on or make changes to this bug.