Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lucyann Lenon Emerick De Assis Newsgroups: comp.lang.java.programmer Subject: Re: serversocket Date: Mon, 16 Jul 2012 04:49:06 -0700 (PDT) Organization: http://groups.google.com Lines: 59 Message-ID: References: <15b1bc5d-160d-4048-8ad7-2cff9cf862e0@googlegroups.com> <76cf48db-123d-4888-ac60-4b80ccfdeea4@googlegroups.com> NNTP-Posting-Host: 186.192.39.162 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1342439347 1875 127.0.0.1 (16 Jul 2012 11:49:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 16 Jul 2012 11:49:07 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=186.192.39.162; posting-account=573jrgoAAACK9jDuW0THTSSJRj_tDRr9 User-Agent: G2/1.0 X-Received-Bytes: 2759 Xref: csiph.com comp.lang.java.programmer:16042 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; >=20 > ... >=20 > > public class Track > > { >=20 > ... >=20 > > private static void serveConnections(ServerSocket serverSocket) > > { > > while (true) > > { > > final Socket connectionSocket; > > try > > { > > connectionSocket =3D serverSocket.accept(); > > } > > catch (IOException exc) > > { > > logger.error(BAD_CONNECT, exc); > > return; > > } > > assert connectionSocket !=3D null; > > > > try > > { > > handleClient(connectionSocket); > > } > > finally > > { > > close(connectionSocket); > > } > > } > > } > ... >=20 > I made a mistake in the 'serveConnections()' method, arguably. Or= maybe it=20 > isn't a mistake. >=20 > What do you think; is it a mistake or not? >=20 > --=20 > Lew > Honi soit qui mal y pense. > http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg