Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #16689

LAN strategy (Android)

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed101.telia.com!starscream.dk.telia.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Dirk Bruere at NeoPax <dirk.bruere@gmail.com>
Newsgroups comp.lang.java.programmer
Subject LAN strategy (Android)
Date Tue, 31 Jul 2012 00:02:25 +0100
Organization Dirk Bruere at Neopax
Lines 20
Message-ID <a7oi3eFi35U1@mid.individual.net> (permalink)
Reply-To dirk.bruere@gmail.com
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net CX4IkwEZ5D978946Y7sN1wFsgR3TXIqb+84a8/Q2WbCiIG63ZObLMYRspqlkGWTCc9
Cancel-Lock sha1:X2q1Kvtzx1BPEIey83bpe7Qs8fA=
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
X-Antivirus avast! (VPS 120730-0, 30/07/2012), Outbound message
X-Antivirus-Status Clean
Xref csiph.com comp.lang.java.programmer:16689

Show key headers only | View raw


What's the best way to do this?

I have to read from a LAN using UDP.
I open a socket by doing a name lookup (the name of a PC I want to 
connect to) and port number as the app starts.

In a thread I loop around reading the socket for messages and act on them.

The problem is what do I do if I cannot access the LAN on startup and so 
miss getting the name/address? As far as I can see the app sits there 
doing nothing even if the LAN becomes available.

Alternatively, do I put the name/address lookup in the thread loop, and 
if so, how?


-- 
Dirk

Full Spectrum Praxis : ZERO STATE : http://zerostate.net

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

LAN strategy (Android) Dirk Bruere at NeoPax <dirk.bruere@gmail.com> - 2012-07-31 00:02 +0100
  Re: LAN strategy (Android) Roedy Green <see_website@mindprod.com.invalid> - 2012-07-31 04:23 -0700

csiph-web