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


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

LAN strategy (Android)

From Dirk Bruere at NeoPax <dirk.bruere@gmail.com>
Newsgroups comp.lang.java.programmer
Subject LAN strategy (Android)
Date 2012-07-31 00:02 +0100
Organization Dirk Bruere at Neopax
Message-ID <a7oi3eFi35U1@mid.individual.net> (permalink)

Show all headers | 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