timeout parameter for net-receive-udp

Q&A's, tips, howto's
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

timeout parameter for net-receive-udp

Post by HPW »

Can net-receive-udp get a additional parameter 'timeout' ?

Then it wood listen to incomming UDP, but when timeout is reached it wood come back from the call with some return-message.

Problem: When I call the function from the DLL the app becomes busy and blocked. It wood be nice to get the control back in a time-interval and restart it when needed.

Discussion here:
http://www.neosoftware.com/cgi-bin/ikon ... topic=1578
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

I think it can be done, will look into it,

Lutz

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

>I think it can be done, will look into it,

Thanks for that, another idea would be to use newLISP.EXE as a seperate process to get a always active message-receiver which runs independent of the main-process. The message-receiver buffers the incoming messages in files and the mainprocess can read them when it has time for this action.

I will that give a try too.
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

I have made a new EXE with (link ) with a UdpListener.
This I can start hidden from neobook and it logs all incoming messages inside a choosable Directory.

I think this is more elegant, since the risk of loosing incoming messages is smaller.
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

development version newLISP 8.0.7 has an optional timeout parameter in net-receive-udp

Lutz

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Thanks Lutz,

I will give it a try!
Hans-Peter

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Great extention, great enhancement.. Thanks...
-- (define? (Cornflakes))

Locked