Radiance Posted October 6, 2015 Share Posted October 6, 2015 (edited) I need to write a TCP multiclient server. There's one main loop which checks for new connections and gives simple one-word responses to clients who make requests.While 1 Sleep(50) _ProcessTCPRequestsFromAllConnectedClients() $Socket = "" $Socket = TCPAccept($MainSocket) If $Socket = -1 Then ContinueLoop _RegisterNewUser($Socket) WEndClient asks: What time is it?Server responds: 10:41 amThe responses need to be sent as fast as possible.Let's say a client with an older version connects and I want to send im an updated .exe which has 5 MB in size.How would I go about sending that file to the client without slowing down the main loop too much?The filetransfer doesn't need to be very speedy, can take as long as needed.Any ideas welcome. Edited October 6, 2015 by Radiance Link to comment Share on other sites More sharing options...
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