Thread: Faulty network event notification?

  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 11: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, 03:27 AM
  2. Event driven thread programming
    By jaxen in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2006, 08: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