Index: GridProxy.cs =================================================================== --- GridProxy.cs (revision 2445) +++ GridProxy.cs (working copy) @@ -241,21 +241,27 @@ } // SetLoginRequestDelegate: specify a callback loginRequestDelegate that will be called when the client requests login - public void SetLoginRequestDelegate(XmlRpcRequestDelegate loginRequestDelegate) + public XmlRpcRequestDelegate SetLoginRequestDelegate(XmlRpcRequestDelegate loginRequestDelegate) { + XmlRpcRequestDelegate lastDelegate; lock (this) { + lastDelegate = this.loginRequestDelegate; this.loginRequestDelegate = loginRequestDelegate; } + return lastDelegate; } // SetLoginResponseDelegate: specify a callback loginResponseDelegate that will be called when the server responds to login - public void SetLoginResponseDelegate(XmlRpcResponseDelegate loginResponseDelegate) + public XmlRpcResponseDelegate SetLoginResponseDelegate(XmlRpcResponseDelegate loginResponseDelegate) { + XmlRpcResponseDelegate lastDelegate; lock (this) { + lastDelegate = this.loginResponseDelegate; this.loginResponseDelegate = loginResponseDelegate; } + return lastDelegate; } // AddDelegate: add callback packetDelegate for packets of type packetName going direction @@ -569,7 +575,7 @@ } - private Dictionary KnownCaps; + public Dictionary KnownCaps; //private Dictionary SubHack = new Dictionary(); private void ProxyCaps(NetworkStream netStream, string meth, string uri, Dictionary headers, byte[] content, int reqNo) @@ -1134,7 +1140,7 @@ */ private Socket simFacingSocket; - private IPEndPoint activeCircuit = null; + public IPEndPoint activeCircuit = null; private Dictionary proxyEndPoints = new Dictionary(); private Dictionary simProxies = new Dictionary(); private Dictionary proxyHandlers = new Dictionary();