CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Winsock

  1. #1
    Join Date
    Jun 2001
    Posts
    15

    Winsock

    I have a Server Client winsock control and need to know a graceful
    way of shutting down the Client side without while leaving the Serve
    side up and running for other Client connections. Right know if I use
    the .Close or shut down the client it also closes the Server tcp connect
    to other Clients. I need a way of having the client disconnect from the connection without closing everything.

    Thanks in advance!


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Winsock

    I am not sure how winsock control work internally, for winsock API, when you listen to a port and found that the client is connecting to you, you will need to create extra socket to use for that particular connection, and the original one will keep listening for other client. We can control the maximum number of client that we are going to accept using API.

    but for winsock control, I afraid you can't, I guess is because the socket limited to 1 connection. However, you can have a timer to constantly check the winsock state (.State), when found it's closed, just start listening again.


    HTH

    cksiow
    http://vblib.virtualave.net - share our codes


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