Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LocalEndPoint

unsafe? EndPoint System.Net.Sockets.Socket.LocalEndPoint
get

Definition at line 614 of file Socket.cs.

615 {
616 get
617 {
619 if (_nonBlockingConnectInProgress && Poll(0, SelectMode.SelectWrite))
620 {
623 }
624 if (_rightEndPoint == null)
625 {
626 return null;
627 }
628 if (_localEndPoint == null)
629 {
630 System.Net.Internals.SocketAddress socketAddress = IPEndPointExtensions.Serialize(_rightEndPoint);
631 fixed (byte* buffer = socketAddress.Buffer)
632 {
633 fixed (int* nameLen = &socketAddress.InternalSize)
634 {
635 SocketError sockName = SocketPal.GetSockName(_handle, buffer, nameLen);
636 if (sockName != 0)
637 {
639 }
640 }
641 }
642 _localEndPoint = _rightEndPoint.Create(socketAddress);
643 }
644 return _localEndPoint;
645 }
646 }
virtual EndPoint Create(SocketAddress socketAddress)
Definition EndPoint.cs:20
SafeSocketHandle _handle
Definition Socket.cs:533
void UpdateStatusAfterSocketErrorAndThrowException(SocketError error, [CallerMemberName] string callerName=null)
Definition Socket.cs:3715
bool Poll(int microSeconds, SelectMode mode)
Definition Socket.cs:2337

Referenced by System.Net.Sockets.Socket.DoConnect(), System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSyncSuccess(), and System.Net.FtpControlStream.GetPortCommandLine().