private Response ReceiveResponse(Request req) { MessageQueue q = Queues.Get(req.ClientID); q.Purge(); while (true) { if (CanReceive(q, req)) { return((Response)q.Receive().Body); } } }
private void MessagePump() { MessageQueue q = Queues.Get(ServerID); q.Purge(); while (true) { if (CanHandleEvent(q)) { Response res = HandleEvent((Request)q.Receive().Body); if ("Server.Kill" == res.Request.Method) { break; } } } }
private void SendRequest(Request req) { Message m = new Message(req, new BinaryMessageFormatter()); Queues.Get(req.ServerID).Send(m); }