private void ClientConnection(PipeServer pserver) { //var client = (TcpClient)o; //var endpoint = (IPEndPoint)client.Client.RemoteEndPoint; //Log?.Invoke($"(client-connected \"{endpoint.Address}:{endpoint.Port}\")"); //var ns = new NetStream(client); var server = new Transfering(pserver.SendStream, pserver.ReceiveStream, BufferSize); server.StartReceiver(data => { //SetContextObj(ContextTcpClientId, client); // TODO single set SetContextObj(ReClientId, new OTcpServer.ReClient(server, Evaluator, _queryInterface)); // TODO single set return(DataHandler(Evaluator, data, _queryInterface.GetSymbolTable())); }); }
public object Call(object seq) { var resp = BinFormater.Read(new MemoryStream(Transfering.Send(BinFormater.Write(seq, _queryInterface.GetSymbolTable()).ToArray())), _queryInterface.GetSymbolTable()); return(resp?.Car()); }
public object Call(object seq) { var resp = BinFormater.Read(new MemoryStream(Transfering.Send(BinFormater.Write(seq, _queryInterface.GetSymbolTable()).ToArray())), _queryInterface.GetSymbolTable()); if (resp.Car() is SpecialMessage) { OnSpecialMessageEvt(resp.Car() as SpecialMessage, seq); return(null); } return(resp?.Car()); }