Quick Winsock Question

Started by
1 comment, last by CPPNick 13 years, 9 months ago
If I am using overlapped sockets with i/o completion ports, is it ok to use WSASend on a socket to send data after posting the initial WSARecv on that same socket, but before having received any data? Will the socket still receive data and trigger the completion port if I have sent data through it?

Thanks, Nick
Advertisement
Yes, when using overlapped I/O on sockets using WinSock 2.2, receiving and sending are totally separate.

(In fact, with "shutdown," you may even be able to close one direction without closing the other! But you're unlikely to need this, so sorry for complicating the answer :-)

enum Bool { True, False, FileNotFound };
Thanks =D This simplifies things for me immensely.

This topic is closed to new replies.

Advertisement