Re: Completion Port issue
- From: Karl Bauer <Kabe@xxxxx>
- Date: Tue, 29 Nov 2005 20:49:11 +0100
Michael Pauling schrieb:
MSDN states that a previous sendto() initiated a "port unreachable" ICMP, that means no prog executing a recvfrom(..) that port.Hi,
I use iocp in conjunction with UDP.
Roughly it works as follows:
Start: - WSARecvFrom(sock, ... sockaddr, ... sockaddr contains the peer address.
The data itself contain a port number the client wishes to receive data from, lets say 1234.
- manipulate sin_port of sockaddr to 1234 to the client's wish - call sendto(sock, ...) with modified sockaddr. That seems to work as sendto returns the correct number of bytes and data can be seen using netmon.
- goto Start and issue anothe WSARecvfrom This time recvfrom fails with 10054 (connection close by remote host) which isn't supposed to happen with udp sockets.
Remember, socket-handle sock is the same for WSARECVFrom and sendto, coukld this be the problem?
For TCP best close the socket. For UDP I'm not sure as there is no virtual circuit assiciated with that socket.
Maybe Arkady knows more? .
- References:
- Completion Port issue
- From: Michael Pauling
- Completion Port issue
- Prev by Date: Re: how to force automatic restart of a service
- Next by Date: Re: local path from local share name
- Previous by thread: Completion Port issue
- Next by thread: Re: Completion Port issue
- Index(es):
Relevant Pages
|