Hi Glyph, sorry for my english.
My server.py save last answer(see User.perspectiveMessageReceived).
Client when an error occurs(in callRemote) schedule reconnect. After reconnect client call remote method which return last answer.
It works if disconnect happened when server send data to client(_server->client_). (try set MyServer.crash_server_to_client to True)
But it doesn't work if disconnect happened when client send data to server(_client->server_). Becouse server after reconnect send previous data. It can fix if client be known when error occurs(server->client or client->server). (see comment in Client.net_error).
PS for emulate error client->server set Client.crash_client_to_server to True, don't forget set MyServer.crash_server_to_client to False)
On Mon, May 24, 2010 at 5:19 AM, Glyph Lefkowitz email@example.com wrote:
On May 23, 2010, at 11:54 AM, Viktor Klimov wrote:
I use PB in unstable network. The server remembers the last answer. Client detection disconnected, connected again, makes entry into the system and calls the function returns the last response (get_last_response). The answer, it returns a deferred saved earlier. If somewhere an error cycle repeats.
All of this works until the lost communication does not happen at a time when Twisted sends data to a server. As the server in this situation does not receive a first request, and when you call get_last_response client receives the data that has already received.
How can I check if an error in the client arrived data to the server or not?
I try not to give people a hard time about bad English, but I am having a hard time reading your message. There are a couple of different things I think you might mean and it would be confusing if I tried to explain them all.
Perhaps you could attach some Python code that explains exactly what you mean?
Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python