public override void handle_connect(AsyncConnect ar) { Socket sock = (Socket)ar.handle(); iServiceHandler svc = m_service_handler_strategy.makeServiceHandler(); svc.open(sock); }
public override void handle_timer(object o) { AsyncTimer ar = (AsyncTimer)o; AsyncConnect op_connect = (AsyncConnect)ar.item(); Socket sock = (Socket)op_connect.handle(); if (!sock.Connected) { // Close the socket, timeout sock.Close(); } }