TCP\IP server-client

Blitz3D Forums/Blitz3D Beginners Area/TCP\IP server-client

ILonion(Posted 2014) [#1]
Hello!
I'm beginner and now learning blitz3d tcp\ip working with a little server-client code.
Some parts used from Wings example (http://www.blitzbasic.com/codearcs/codearcs.php?code=3140) and from default samples.

Well, server and client are working until ~< 15 clients connected.

Here my example code. I run it local on my machine.
After 15+ clients - server is hanged (on 8192 incoming bytes per stream (see prints on server screen)) until not stop some clients.

What is wrong?
Is this buffer overflow (RWIN - Receive Window TCP\IP) or wrong packet size (recommended 576 - 40(tcp header)=536?) or CPU "low" speed?
or something else?



server:


client:



ILonion(Posted 2014) [#2]
knock-knock..


Guy Fawkes(Posted 2014) [#3]
Who's there? :D


ILonion(Posted 2014) [#4]
:)


Guy Fawkes(Posted 2014) [#5]
:)


Wings(Posted 2014) [#6]
Yea i discovered the 8192 too some yars ago 2005. its per stream at least ;)

i decided to go for controlling the sending. oranice data in banks. sending a bank of 512 or 1024..

its a balance in Blitz to code tcpip.

to Clean the buffer client needs to read data. after client read data server may continue..

some one sudgest use a dll to turn of this buffer hold thing..


ILonion(Posted 2014) [#7]
Thank you very much Wings, i've got it!