Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > LAN strategy (Android)

Reply
Thread Tools

LAN strategy (Android)

 
 
Dirk Bruere at NeoPax
Guest
Posts: n/a
 
      07-31-2012
From: "Dirk Bruere at NeoPax" <dirk.bruere.at.neopax@1:261/38.remove-dpk-this>

From: Dirk Bruere at NeoPax <(E-Mail Removed)>

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

-+- BBBS/Li6 v4.10 Dada-1
+ Origin: Prism bbs (1:261/3
-+- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24

--- BBBS/Li6 v4.10 Dada-1
* Origin: Prism bbs (1:261/3
--- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-31-2012
To: Dirk Bruere at NeoPax
From: "Roedy Green" <roedy.green@1:261/38.remove-dpk-this>

To: Dirk Bruere at NeoPax
From: Roedy Green <(E-Mail Removed)>

On Tue, 31 Jul 2012 00:02:25 +0100, Dirk Bruere at NeoPax
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

>What's the best way to do this?


get the book with the three trains on the cover. See
http://mindprod.com/jgloss/thread.html

use
import java.util.concurrent.BlockingQueue; import
java.util.concurrent.ConcurrentHashMap; import
java.util.concurrent.LinkedBlockingQueue; import
java.util.concurrent.Semaphore; import java.util.concurrent.ThreadPoolExecutor;
--
Roedy Green Canadian Mind Products
http://mindprod.com
The greatest shortcoming of the human race is our inability to understand the
exponential function.
~ Dr. Albert A. Bartlett (born: 1923-03-21 age: 89)
http://www.youtube.com/watch?v=F-QA2rkpBSY

-+- BBBS/Li6 v4.10 Dada-1
+ Origin: Prism bbs (1:261/3
-+- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24

--- BBBS/Li6 v4.10 Dada-1
* Origin: Prism bbs (1:261/3
--- Synchronet 3.16a-Win32 NewsLink 1.98
Time Warp of the Future BBS - telnet://time.synchro.net:24
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LAN strategy (Android) Dirk Bruere at NeoPax Java 1 07-31-2012 06:02 PM
LAN strategy (Android) Dirk Bruere at NeoPax Java 1 07-31-2012 11:23 AM
Can't connect wired linksys lan to wireless belkin lan Tom D Wireless Networking 4 01-24-2005 02:06 PM
lan-to-lan vpn over adsl blaj Cisco 0 11-19-2003 08:32 PM
IPSec - Lan to Lan - Nat routers - 1 Static and 1 Dynamic ip Sharqy_5 Cisco 0 07-20-2003 09:35 PM



Advertisments