Re: Completion Port issue

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Michael Pauling schrieb:
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?
MSDN states that a previous sendto() initiated a "port unreachable" ICMP, that means no prog executing a recvfrom(..) that port.

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?
.



Relevant Pages

  • RE: CAsyncSocket
    ... >ich möchte zwei UDP Sockets erstellen, ... >Port aber unterschiedliche IPs bedienen. ... >Das Problem besteht nun darin: ... >wenn ich versuche den ersten Socket mit Angabe der IP ...
    (microsoft.public.de.vc)
  • Re: Problem with socket
    ... Be aware that those port numbers are part of the IANA-assigned range. ... socket operations on sockets for which there are no handles... ... The result of using comma lists is ... you have used the completely meaningless word "crash" to describe your ...
    (microsoft.public.vc.mfc)
  • RE: call is blocked in recvfrom() and no further proceedings in Win CE
    ... In windows CE, I'm able to send a request but I'm unable to receive it. ... Create another socket & bind with server IP address. ... > My program has to send request to service through port 5070(in this port only ...
    (microsoft.public.windowsce.embedded)
  • Re: ISA Event
    ... applying ISA SP1 resolved the issue. ... So it's worth asking - is this SBS ... > Web Proxy service failed to bind its socket to 192.168.4.9 port 443. ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Freebsd IP Forwarding performance (question, and some info) [7-stable, current, em, smp]
    ... INADDR_ANY and a specific port. ... sendtoon a specific address and port on a socket that has been bound to ... bogus exit code) and adds a sleep after send failure. ... unless HZ is too small or the queue is too large. ...
    (freebsd-net)