How to keep socket connection alive in android
Yanmar mini excavator problems
In order to connect to a server over the internet (via TCP/IP) in Java, you need to create a java.net.Socket and connect it to the server. Alternatively you can use a Java NIO SocketChannel, in case you prefer to use Java NIO.
Ok, thanks! I already have a system of pinging to keep it alive, I was just wondering if a websocket alone could keep it alive, because I’m already going to have a websocket connection opened and it would be easier to just have that.