Chat on android, without intermediary server [closed]

0

I want to do a chat on android , where chat messages pass directly between phone and phone, without having to go through the server. The process to start a chat between a user A and B would be something like this:

  • User A connects to the server.

  • Look for user B in the server DB.

  • After having found it, user A starts a connection with user B.

  • Messages are sent between phones without going through the server.

  • Is it possible not to depend on a server to send the messages to the clients? If so, any ideas to carry out this process?

        
    asked by Facundo Curti 19.01.2017 в 02:43
    source

    1 answer

    2

    It is possible, but it would be good to specify your use case a bit.

    The ideas are:

    • Use a STUN server (RFC 5389) to allow a p2p connection with NAT in between
    • Implement the chat using RTMFP (RFC 7016)
    • Consider UDP, negotiating IP and port with a central server
    • In case of chat between groups, consider UDP Multicast
    answered by 19.01.2017 / 05:48
    source