Simple way to use sockets in java