public void Request(IUpMsg msg, Action <object> method) { NetRequest request = new NetRequest(reqId, msg, method); requests.Add(reqId, request); connection.Send(msg.bytes); reqId++; // Vitamin.delay(1000, (object sender, System.Timers.ElapsedEventArgs arg) => // { // method(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }); // }); }
public void Notify(IUpMsg msg) { connection.Send(msg.bytes); }
public NetRequest(uint requestId, IUpMsg msg, Action <IDownMsg> method) { this.requestId = requestId; this.msgup = msg; this.action = method; }