Exemple #1
0
 public UdpEndpointI(ProtocolInstance instance, BasicStream s) :
     base(instance, s)
 {
     if(s.getReadEncoding().Equals(Ice.Util.Encoding_1_0))
     {
         s.readByte();
         s.readByte();
         s.readByte();
         s.readByte();
     }
     // Not transmitted.
     //_connect = s.readBool();
     _connect = false;
     _compress = s.readBool();
 }
Exemple #2
0
 public TcpEndpointI(BasicStream s)
 {
     _instance = s.instance();
     s.startReadEncaps();
     _host = s.readString();
     _port = s.readInt();
     _timeout = s.readInt();
     _compress = s.readBool();
     s.endReadEncaps();
     calcHashValue();
 }
Exemple #3
0
        public Reference create(Ice.Identity ident, BasicStream s)
        {
            //
            // Don't read the identity here. Operations calling this
            // constructor read the identity, and pass it as a parameter.
            //

            if(ident.name.Length == 0 && ident.category.Length == 0)
            {
                return null;
            }

            //
            // For compatibility with the old FacetPath.
            //
            string[] facetPath = s.readStringSeq();
            string facet;
            if(facetPath.Length > 0)
            {
                if(facetPath.Length > 1)
                {
                    throw new Ice.ProxyUnmarshalException();
                }
                facet = facetPath[0];
            }
            else
            {
                facet = "";
            }

            int mode = (int)s.readByte();
            if(mode < 0 || mode > (int)Reference.Mode.ModeLast)
            {
                throw new Ice.ProxyUnmarshalException();
            }

            bool secure = s.readBool();

            EndpointI[] endpoints = null;
            string adapterId = "";

            int sz = s.readSize();
            if(sz > 0)
            {
                endpoints = new EndpointI[sz];
                for(int i = 0; i < sz; i++)
                {
                    endpoints[i] = instance_.endpointFactoryManager().read(s);
                }
            }
            else
            {
                adapterId = s.readString();
            }

            return create(ident, facet, (Reference.Mode)mode, secure, endpoints, adapterId, null);
        }
Exemple #4
0
 public TcpEndpointI(ProtocolInstance instance, BasicStream s) :
     base(instance, s)
 {
     _timeout = s.readInt();
     _compress = s.readBool();
 }
Exemple #5
0
 public UdpEndpointI(BasicStream s)
 {
     instance_ = s.instance();
     s.startReadEncaps();
     _host = s.readString();
     _port = s.readInt();
     if(s.getReadEncoding().Equals(Ice.Util.Encoding_1_0))
     {
         s.readByte();
         s.readByte();
         s.readByte();
         s.readByte();
     }
     // Not transmitted.
     //_connect = s.readBool();
     _connect = false;
     _compress = s.readBool();
     s.endReadEncaps();
     calcHashValue();
 }
Exemple #6
0
 public UdpEndpointI(BasicStream s)
 {
     instance_ = s.instance();
     s.startReadEncaps();
     _host = s.readString();
     _port = s.readInt();
     _protocolMajor = s.readByte();
     _protocolMinor = s.readByte();
     _encodingMajor = s.readByte();
     _encodingMinor = s.readByte();
     if(_protocolMajor != Protocol.protocolMajor)
     {
         Ice.UnsupportedProtocolException e = new Ice.UnsupportedProtocolException();
         e.badMajor = _protocolMajor < 0?_protocolMajor + 255:_protocolMajor;
         e.badMinor = _protocolMinor < 0?_protocolMinor + 255:_protocolMinor;
         e.major = Protocol.protocolMajor;
         e.minor = Protocol.protocolMinor;
         throw e;
     }
     if(_encodingMajor != Protocol.encodingMajor)
     {
         Ice.UnsupportedEncodingException e = new Ice.UnsupportedEncodingException();
         e.badMajor = _encodingMajor < 0?_encodingMajor + 255:_encodingMajor;
         e.badMinor = _encodingMinor < 0?_encodingMinor + 255:_encodingMinor;
         e.major = Protocol.encodingMajor;
         e.minor = Protocol.encodingMinor;
         throw e;
     }
     // Not transmitted.
     //_connect = s.readBool();
     _connect = false;
     _compress = s.readBool();
     s.endReadEncaps();
     calcHashValue();
 }