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