CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 1999
    Location
    Canada, shivering north
    Posts
    6

    Client / Server problem

    I am very new to internet with vb, and I am having problems with my
    client / server program, I can't get my server to accept the client's
    ConnectionRequest, what code do I have to enter? And where do I place it?

    Thanks.


  2. #2
    Join Date
    Oct 1999
    Posts
    2

    Re: Client / Server problem

    if u use only one socket to establish the connection then u have to add this line of code to ur ConnectionRequest event
    if sockname.state <> sckClosed then
    sockname.close
    sockname.accept
    endif
    if u have more that one socket u can use one of them to be listining and the other accept the connection but becareful
    if u used the old code and the sockname were for the sockect that are not listining, any new connection request that made by others will cuase a conection loss with Previous established one
    in other words
    if a connected to the server and b try to do so
    a will los the connection and b will establish it
    so becarfull
    the solution for this can be made by creating a dynamic sockets for each new connection and this is new story


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