Faulty network event notification?

This is a discussion on Faulty network event notification? within the Networking/Device Communication forums, part of the General Programming Boards category; Hey guys, I'm kind of puzzled about this. I'm using WSAEventSelect() to notify on read, write, connect, OOB and accept. ...

  1. #1
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    Faulty network event notification?

    Hey guys, I'm kind of puzzled about this. I'm using WSAEventSelect() to notify on read, write, connect, OOB and accept. A client socket connects to a server socket (calls connect() using "localhost"); the werver socket receives notification of FD_ACCEPT, but doesn't call accept() yet; the client receives notification of FD_CONNECT.

    What I don't get is that on MSDN it says that FD_CONNECT indicates completion of a connection, and the error bit tells you whether it failed or not. But if the server hasn't accepted the connection, how can the client have successfully completed the connection (Yes, I checked and the error bit is zero; and when I try connecting with no socket listening, it does give me an error)? Also, even before the FD_CONNECT event, I get an FD_WRITE event on the client socket, and when I try sending data, it doesn't return SOCKET_ERROR. In the mean time, after sending data, I don't get another FD_WRITE notification. And, to top it all off, I don't get any FD_READ notifications on the server socket. What's up with this whole deal?
    Last edited by Hunter2; 03-19-2004 at 10:15 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 02:27 AM
  2. Event driven thread programming
    By jaxen in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2006, 07:46 AM
  3. Actors, cues, event based logic.
    By Shamino in forum Game Programming
    Replies: 2
    Last Post: 04-27-2006, 10:58 PM
  4. Persistence of network events
    By Hunter2 in forum Networking/Device Communication
    Replies: 0
    Last Post: 10-02-2004, 08:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21