Michael36 Posted October 5, 2005 Posted October 5, 2005 Hi guys from the examples i'm trying to Build a simple server so my client can connect to it well i did that works good but looking at my server code it will only let 1 client connect any ideas how icould get more then one client to connect ?this is how my server works when i client connects to my server and types something the server then feeds it to the other clients .but i can only get one client to connect would anyone know of a way i could get more then one to connect thank you michaeldim $ConnectedSocket$g_IP = "127.0.0.1"TCPStartUp()$MainSocket = TCPListen($g_IP, 65431, 100 )If $MainSocket = -1 Then Exit While 1$ConnectedSocket = TCPAccept( $MainSocket)If $ConnectedSocket >= 0 ThenTCPSend( $ConnectedSocket , "connected" )Sleep(2000)endif;----------------------------------------------------------------------$recv = TCPRecv($ConnectedSocket, 512 ) If $recv <> "" ThenTCPSend( $ConnectedSocket, $recv ) endif Wend
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now