Skip to content Skip to sidebar Skip to footer

Tcp Session Between Two Smartphones?

Is it possible to establish a TCP/IP session between two smartphones? I know that a smartphone can connect to a server, but cannot respond to connection requests. Is there a proto

Solution 1:

I actually don't know any way to establish p2p connection here, but I think approach with the server in the middle should meet your expectations. it's called socket-connections, at a glance it looks like a channel, that hosts on a server side, and any clients (devices) can join this channel (two or more, whatever you want). If device send a message to the server, it should broadcast the message toward all other participants (it can broadcast the message even to the sender itself, but with some meta-information so we can distiguish our own messages and ignore them).

Thereby first of all you need server with socket connection established, then you can implement any of already existing solutions (e.g. https://github.com/daltoniam/Starscream for iOS). Also you may want to take a look at AWS https://aws.amazon.com, as it has the socket connection service out of the box for the server side and required SDK for both Android and iOS platforms.

Post a Comment for "Tcp Session Between Two Smartphones?"