Exemplo n.º 1
0
        internal RpcTcpTransport GetTransport(int program, int version)
        {
            RpcTcpTransport transport;
            if (!_transports.TryGetValue(program, out transport))
            {
                PortMapper pm = new PortMapper(this);
                int port = pm.GetPort(program, version, PortMapperProtocol.Tcp);
                transport = new RpcTcpTransport(_serverAddress, port);
                _transports[program] = transport;
            }

            return transport;
        }
Exemplo n.º 2
0
        internal RpcTcpTransport GetTransport(int program, int version)
        {
            RpcTcpTransport transport;

            if (!_transports.TryGetValue(program, out transport))
            {
                PortMapper pm   = new PortMapper(this);
                int        port = pm.GetPort(program, version, PortMapperProtocol.Tcp);
                transport            = new RpcTcpTransport(_serverAddress, port);
                _transports[program] = transport;
            }

            return(transport);
        }
Exemplo n.º 3
0
        protected RpcReply DoSend(MemoryStream ms)
        {
            RpcTcpTransport transport = _client.GetTransport(Identifier, Version);

            byte[] buffer = ms.ToArray();
            buffer = transport.Send(buffer);

            XdrDataReader    reader = new XdrDataReader(new MemoryStream(buffer));
            RpcMessageHeader header = new RpcMessageHeader(reader);

            return(new RpcReply()
            {
                Header = header, BodyReader = reader
            });
        }