Example #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);
		}
 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);
 }
Example #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);
        }