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

◆ Accept()

static SocketError System.Net.Sockets.SocketPal.Accept ( SafeSocketHandle listenSocket,
byte[] socketAddress,
ref int socketAddressSize,
out SafeSocketHandle socket )
inlinestatic

Definition at line 159 of file SocketPal.cs.

160 {
161 IntPtr preexistingHandle = global::Interop.Winsock.accept(listenSocket, socketAddress, ref socketAddressSize);
162 socket = new SafeSocketHandle(preexistingHandle, ownsHandle: true);
163 if (System.Net.NetEventSource.Log.IsEnabled())
164 {
165 System.Net.NetEventSource.Info(null, socket, "Accept");
166 }
167 if (!socket.IsInvalid)
168 {
169 return SocketError.Success;
170 }
171 return GetLastSocketError();
172 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static SocketError GetLastSocketError()
Definition SocketPal.cs:22

References System.Net.Sockets.SocketPal.GetLastSocketError(), System.Net.NetEventSource.Info(), and System.Net.NetEventSource.Log.

Referenced by System.Net.Sockets.Socket.Accept().