Tuesday, January 17, 2012

Android TCP and UDP basic code examples

This is a tiny app that has examples for both android TCP and UDP communications.

Remember, you should:

TCP - start the server first, because ServerSocket.accept() blocks

UDP - start the client first, because DatagramSocket.receive() blocks