android Handle multiple clients connected to a server using sockets -
i have android app needs allow multiple socket communication. here basic work around:
my application( server) service run sever socket. other application can connect on predefined port. there can multiple connection client 1, client 2.
so when client 1 send hello, server process , should send reply client 1.
currently able connect server client 1 , client 2. have created input , output buffer same. not sure how server observe has received "hello".
i referring illustration , still not clear how utilize solution:
how can handle multiple clients connected server using sockets?
the serversocket.accept() call, creates connection on server side, returns socket. each phone call take create new socket communication particular client. whatever socket sends input socket needs response.
android sockets serversocket
No comments:
Post a Comment