System.Net.Sockets.Socket.Socket C# (CSharp) Méthode

Socket() private méthode

private Socket ( SafeCloseSocket fd ) : System.Collections.Generic
fd SafeCloseSocket
Résultat System.Collections.Generic
        private Socket(SafeCloseSocket fd)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this);
            InitializeSockets();

            // NOTE: if this ctor is re-publicized/protected, check
            // that fd is valid socket handle.

            // This should never happen.
            if (fd == null || fd.IsInvalid)
            {
                throw new ArgumentException(SR.net_InvalidSocketHandle);
            }

            _handle = fd;

            _addressFamily = Sockets.AddressFamily.Unknown;
            _socketType = Sockets.SocketType.Unknown;
            _protocolType = Sockets.ProtocolType.Unknown;
            if (NetEventSource.IsEnabled) NetEventSource.Exit(this);
        }
        #endregion

Same methods

Socket::Socket ( AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType ) : System.Collections.Generic
Socket::Socket ( SocketInformation socketInformation ) : System.Collections.Generic
Socket::Socket ( SocketType socketType, ProtocolType protocolType ) : System.Collections.Generic