In Java, what would the best way be to have a constantly listening port open, and still send upon receipt of a packet. I'm not particularly savvy with network programming at the moment, so the tutorials I've found on the net aren't particularly helpful.
Would it make sense to have the listening socket as a serversocket and run it in a separate thread to the socket I'm using to send data to the server?
In a loosely related question. Does anyone know if programming simply for java, in netbeans then exporting it for use on a blackberry (using a plugin) the sockets would still work?
Thanks in advance for any responses =]