Question about Ipv6 datagram server

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Pratap Das (reply_das_at_yahoo.com)
Date: 03/10/04


Date: 9 Mar 2004 17:04:08 -0800

Hi All,
I have a question regarding an IPv6 datagram(UDP) server using
winsock2.
In my sample program , I am open a socket, bind it and then wait on a
recvfrom for data from clients. I can see in the output of "netstat
-an" that it is listening on the designated port.
But from a different machine the client is not able to communicate to
the server. Using a network sniffer I am seeing that the packet from
the client is reaching the server machine but not the server itself,
it is still waiting on the recvfrom.
Now, in the server if I make a call to sendto to the client before
waiting on recvfrom, I am able to send data from the client from the
next packet onwards. So looks like I have to make a call to sendto
before recvfrom to actually start receiving some data on the socket.
I have the IPv4 version of the program which works fine. Both are
examples from the MSDN library. If anyone can provide any pointers
reagrding the above behaviour in the case of IPv6 it will be really
helpful.
Thanks for all the help.
Regards,
--Das



Relevant Pages

  • Re: Socket switch delay
    ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
    (microsoft.public.win32.programmer.networks)
  • Re: Locking on async calls
    ... you must synchronize the entire SendMessage routine as an atomic ... operation to prevent mixed messages from being transmitted to the server. ... You are correct that read and write on the socket do not interfere with each ... If you want to handle multiple client connections from one server object ...
    (microsoft.public.dotnet.general)
  • Re: Design issue with WinSock/GetQueuedCompletionStatus
    ... delegate that to a shutdown routine called after all worker threads ... The application I've created is a server accepting connections on a few ... different TCP/IP ports and then lets the client run different commands. ... a TCP/IP socket can be closed for 2 different reasons: ...
    (microsoft.public.win32.programmer.networks)
  • Re: socket communication: socket doesnt connect
    ... Microsoft MVP, MCSD ... As far as your server code goes, ... accept the listening socket. ... Client client = new Client; ...
    (microsoft.public.vc.language)
  • Re: TCP server stop receiving new connections
    ... reset the event mask of your listening socket each time you ... I have a strange problem in my class library used by all our client ... server applications. ... incomming connections, but keeps current connections. ...
    (microsoft.public.win32.programmer.networks)