示例#1
0
 internal TcpEndpoint(InputStream istr, Transport transport, Protocol protocol)
     : base(istr, protocol)
 {
     Transport          = transport;
     Timeout            = istr.ReadInt();
     HasCompressionFlag = istr.ReadBool();
 }
示例#2
0
        internal static new WSEndpoint CreateIce1Endpoint(Transport transport, InputStream istr)
        {
            Debug.Assert(transport == Transport.WS || transport == Transport.WSS);

            string host     = istr.ReadString();
            ushort port     = ReadPort(istr);
            var    timeout  = TimeSpan.FromMilliseconds(istr.ReadInt());
            bool   compress = istr.ReadBool();
            string resource = istr.ReadString();

            string[] options = resource == "/" ? Array.Empty <string>() : new string[] { resource };

            return(new WSEndpoint(new EndpointData(transport, host, port, options),
                                  timeout,
                                  compress,
                                  istr.Communicator !));
        }
示例#3
0
 // Constructor for unmarshaling
 internal TcpEndpoint(
     InputStream istr,
     Communicator communicator,
     Transport transport,
     Protocol protocol,
     bool mostDerived = true)
     : base(istr, communicator, protocol)
 {
     Transport = transport;
     if (protocol == Protocol.Ice1)
     {
         Timeout            = TimeSpan.FromMilliseconds(istr.ReadInt());
         HasCompressionFlag = istr.ReadBool();
     }
     else if (mostDerived)
     {
         SkipUnknownOptions(istr, istr.ReadSize());
     }
 }
示例#4
0
 internal UdpEndpoint(InputStream istr, Protocol protocol)
     : base(istr, protocol)
 {
     _connect           = false;
     HasCompressionFlag = istr.ReadBool();
 }
示例#5
0
 internal UdpEndpoint(Communicator communicator, InputStream istr) : base(communicator, istr)
 {
     _connect           = false;
     HasCompressionFlag = istr.ReadBool();
 }
示例#6
0
 internal TcpEndpoint(TransportInstance instance, InputStream s) :
     base(instance, s)
 {
     Timeout            = s.ReadInt();
     HasCompressionFlag = s.ReadBool();
 }
示例#7
0
 internal UdpEndpoint(TransportInstance instance, InputStream s)
     : base(instance, s)
 {
     _connect           = false;
     HasCompressionFlag = s.ReadBool();
 }
示例#8
0
 internal TcpEndpoint(Communicator communicator, InputStream istr) : base(communicator, istr)
 {
     Timeout            = istr.ReadInt();
     HasCompressionFlag = istr.ReadBool();
 }