java - Persistent TCP connection client / server -
i'm building client server application android device server on 3g. because of network operator providing 3g, client device behind nat. therefore, impossible server make connection client. adopt approach of polling, before doing so, want exhaust other options. there way ( haven't yet found 1 ) keep tcp socket connection open between client , server, such server able initiate communications client?
the scenario there regular client/server communication based on server state updates on extremely regular basis - talking every couple of seconds. udp better option here? maybe not nat issue still knocks on head.
are there other options available me?
many thanks
nat not mean server can not send anything. open connection client , let server send whatever events records. may want include simple heartbeat protocol make client , server register broken connection , make nat aware connection still being used.
Comments
Post a Comment