internal static unsafe SafeCloseSocket.InnerSafeCloseSocket CreateWSASocket(byte *pinnedBuffer)
 {
     SafeCloseSocket.InnerSafeCloseSocket socket = UnsafeNclNativeMethods.OSSOCK.WSASocket(AddressFamily.Unknown, SocketType.Unknown, ProtocolType.Unknown, pinnedBuffer, 0, SocketConstructorFlags.WSA_FLAG_OVERLAPPED);
     if (socket.IsInvalid)
     {
         socket.SetHandleAsInvalid();
     }
     return(socket);
 }
 internal static SafeCloseSocket.InnerSafeCloseSocket CreateWSASocket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
 {
     SafeCloseSocket.InnerSafeCloseSocket socket = UnsafeNclNativeMethods.OSSOCK.WSASocket(addressFamily, socketType, protocolType, IntPtr.Zero, 0, SocketConstructorFlags.WSA_FLAG_OVERLAPPED);
     if (socket.IsInvalid)
     {
         socket.SetHandleAsInvalid();
     }
     return(socket);
 }
 internal static SafeCloseSocket.InnerSafeCloseSocket Accept(SafeCloseSocket socketHandle, byte[] socketAddress, ref int socketAddressSize)
 {
     SafeCloseSocket.InnerSafeCloseSocket socket = UnsafeNclNativeMethods.SafeNetHandles.accept(socketHandle.DangerousGetHandle(), socketAddress, ref socketAddressSize);
     if (socket.IsInvalid)
     {
         socket.SetHandleAsInvalid();
     }
     return(socket);
 }