D
Dirk Bruere at NeoPax
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?
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?