Re: CANNOT receive UDP data in SERVICE program
- From: GrepAll <GrepAll@xxxxxxxxx>
- Date: Thu, 16 Aug 2007 23:23:30 -0700
More information:
I run the server program on the same machine with the one on which the
client service runs, and the recvfrom can get data correctly.
Any advice?
On 8 16 , 10 14 , GrepAll <Grep...@xxxxxxxxx> wrote:
Here is a strange problem, I cannot receive UDP data in the SERVICE
program while it works well in normal Win32 APP.
Problem description:
It's a service program running in the client machine and it works
following these steps:
1. Broadcast online request which brings local command socket port
number #PORT1 (the server program will later send command data to this
port);
2. Create an UDP socket #SOCK1 and bind the socket with #PORT1;
3. Call setsockopt to set a 5000ms TIMEOUT option on #SOCK1;
4. Call recvfrom on #SOCK1 to receive and process server command.
If I build this program as Win32 APP, it works well. But if I build it
as a Win32 service, server program can receive the broadcast data,
while the recvfrom always returns 10060(WSAETIMEDOUT).
In fact I can see the command data in Sniffer, the port number is
right.
Anybody knows the reason?
.
- Follow-Ups:
- Re: CANNOT receive UDP data in SERVICE program
- From: Farooque Khan
- Re: CANNOT receive UDP data in SERVICE program
- References:
- CANNOT receive UDP data in SERVICE program
- From: GrepAll
- CANNOT receive UDP data in SERVICE program
- Prev by Date: Re: Sockets. Limit on message length.
- Next by Date: Re: Sockets. Limit on message length.
- Previous by thread: CANNOT receive UDP data in SERVICE program
- Next by thread: Re: CANNOT receive UDP data in SERVICE program
- Index(es):