static void DefaultInquiredEventHandler(object sender, InquiredEventArgs e) { (sender as IMessagingSocket).StartResponse (e, ((string)e.InquireMessage) + ":Responsed"); }
void Inquired_PortCheckStartMessage(object sender, InquiredEventArgs args) { NodeHandle[] nodes = _kbr.RoutingAlgorithm.GetRandomNodes (CheckRequestSendNodes); if (nodes == null || nodes.Length == 0) { _msock.StartResponse (args, new PortCheckResponse ()); } else { _msock.StartResponse (args, ACK); PortCheckRequest req = new PortCheckRequest (args.EndPoint); for (int i = 0; i < nodes.Length; i ++) _msock.BeginInquire (req, nodes[i].EndPoint, null, null); } }
void Inquired_PortCheckRequest(object sender, InquiredEventArgs args) { _msock.StartResponse (args, ACK); _msock.BeginInquire (new PortCheckResponse (), (args.InquireMessage as PortCheckRequest).EndPoint, null, null); }
void Inquired_PortCheckResponse(object sender, InquiredEventArgs args) { _msock.StartResponse (args, ACK); lock (_eps) { if (_sentEPs.Contains (args.EndPoint)) return; // ignore } Success (); }
void InquiredStringMessage(object sender, InquiredEventArgs e) { IMessagingSocket msock = sender as IMessagingSocket; string msg = ((string)e.InquireMessage) + "-" + SubscribeKey + "-ok"; msock.StartResponse (e, msg); }