Re: serversocket
Well, first I thank you for the answer, and guidelines apply to my learning=
!
the customer is a good model tk 102 gps, if not I engando communicates via =
tcp.
What struck me is that the same code works on a smartphone, I used the trac=
ker to emulate mylive sending data tk 102
Em s=E1bado, 14 de julho de 2012 18h12min22s UTC-3, Lew escreveu:
Lew wrote:
... [snip] ...
> /* Track
> * $RCSfile$
> */
> package eegee;
...
> public class Track
> {
...
> private static void serveConnections(ServerSocket serverSocket)
> {
> while (true)
> {
> final Socket connectionSocket;
> try
> {
> connectionSocket = serverSocket.accept();
> }
> catch (IOException exc)
> {
> logger.error(BAD_CONNECT, exc);
> return;
> }
> assert connectionSocket != null;
>
> try
> {
> handleClient(connectionSocket);
> }
> finally
> {
> close(connectionSocket);
> }
> }
> }
...
I made a mistake in the 'serveConnections()' method, arguably. Or=
maybe it
isn't a mistake.
What do you think; is it a mistake or not?
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg