Beispiel #1
0
        internal InnerProxy(Socket socket, ChannelManager channelManager)
        {
            this.idProvider = Global.IdProvider;

            this.socket = socket;
            if (this.socket == null)
            {
                this.socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            }

            this.channelManager = channelManager;

            this.contract = this.channelManager.Contract.ContractName;

            this.socket.Configure(this.channelManager.Config);

            this.streamHandler = new AsyncStreamHandler(this.socket, this.channelManager.BufferManager);
        }
Beispiel #2
0
 static Global()
 {
     Serializer       = new ProtoSerializer();
     ExceptionHandler = new ExceptionHandler();
     IdProvider       = new SimpleIdProvider();
 }
Beispiel #3
0
 public ClientChannel(string server, int port, ChannelConfig config)
 {
     this._InnerProxy = new InnerProxy <T>(server, port, config);
     this._IdProvider = Global.IdProvider;
     this._contract   = typeof(T).FullName;
 }