Esempio n. 1
0
 public PeerCred(Socket sock)
 {
     if (sock.AddressFamily != AddressFamily.Unix)
     {
         throw new ArgumentException("Only Unix sockets are supported", "sock");
     }
     this.data = (PeerCredData)sock.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Debug | SocketOptionName.DontRoute | SocketOptionName.OutOfBandInline | SocketOptionName.IPOptions | SocketOptionName.DropSourceMembership | SocketOptionName.BlockSource | SocketOptionName.NoDelay | SocketOptionName.NoChecksum);
 }
Esempio n. 2
0
        public PeerCred(Socket sock)
        {
            if (sock.AddressFamily != AddressFamily.Unix)
            {
                throw new ArgumentException("Only Unix sockets are supported", "sock");
            }

            data = (PeerCredData)sock.GetSocketOption(SocketOptionLevel.Socket, (SocketOptionName)so_peercred);
        }