tcp server problem
Blitz3D Forums/Blitz3D Programming/tcp server problem
| ||
i've decided to finally try my hand at creating an online game with blitz. I looked at the documentation to get a start and looked at online examples when i couldn't get the server to work.game=CreateTCPServer(8067) stream=AcceptTCPStream(game) While KeyHit(1)=0 If ReadAvail(stream) s$=ReadString(stream) Print s EndIf Wend is there anything wrong with the code? i've used it on other computers as well as my own, so i'm sure its not an issue about firewalls or restricted access. |
| ||
never mind, figured it out |
| ||
So, what was the problem, that you figured out? |
| ||
You must call the TCPAcceptStream every frame, and check if there is a new incoming connection then... In the first post, he only checks for incoming stream one time, then looping... |