Tcp between two smartphones?

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

Is there a protocol out there to establish this somehow? Its OK for the server involved in the initial handshake

0


source to share


1 answer


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



So first of all you need a server with an established socket connection, then you can implement any of the already existing solutions (for example, https://github.com/daltoniam/Starscream for IOS). You can also take a look at AWS https://aws.amazon.com as it has a socket service to connect to the server and requires an SDK for Android and iOS platforms.

+1


source







All Articles