CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    293

    Question Question about Building a Server

    Hi.

    I'm building a sever that can serve many client simulatenusly, so I have the main thread which has a socket opened for listening and accepting new connection, and for each new socket I place it in a data-structure.

    my question is: how to make this single thread accepts new sockets and also when a user (that's already connected) sends data to handle it ....?!?! my accept() is non-blocking and I use overlapping sockets.

    I hope I'm being clear......

    Thanks.

  2. #2
    Join Date
    Mar 2004
    Location
    KL, Malaysia
    Posts
    63

    Re: Question about Building a Server

    For non-blocking sockets, you can mulitplex between server socket and any active client sockets using select().

    Kevin Choong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured