Click to See Complete Forum and Search --> : Client / Server problem


TTN
October 11th, 1999, 11:13 AM
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.

Satanai
October 11th, 1999, 02:13 PM
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