使用wsaasyncselect模型,当有数据到来的时候会触发网络事件FD_READ,那么怎么触发FD_WRITE事件呢?就是说当我按下发送按扭时,按扭响应函数里应该怎么做?怎样触发FD_WRITE事件?
请各位大侠帮忙,谢谢了,谢谢了!!

解决方案 »

  1.   

    FD_WRITE Wants to receive notification of readiness for writing. 
    这不需要你去触发The FD_WRITE event is handled slightly differently. An FD_WRITE message is posted when a socket is first connected with connect or WSAConnect (after FD_CONNECT, if also registered) or accepted with accept or WSAAccept, and then after a send operation fails with WSAEWOULDBLOCK and buffer space becomes available. Therefore, an application can assume that sends are possible starting from the first FD_WRITE message and lasting until a send returns WSAEWOULDBLOCK. After such a failure the application will be notified that sends are again possible with an FD_WRITE message.