예제 #1
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);
		}
예제 #2
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);
 }
예제 #3
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);
        }