BLITZ3D TCP HELP

Blitz3D Forums/Blitz3D Programming/BLITZ3D TCP HELP

Caton(Posted 2015) [#1]
Global svrGame=CreateTCPServer(3280)
;Write lev data
WriteInt svrGame,1
WriteString svrGame,"Object:Robot"

strmGame=OpenTCPStream("gameserver.com",3280)
Nofo=ReadInt(strStream)
for NUMOBJ=1 to Nofo
ReadString$(strStream)
next
It's not working.
please help!


Matty(Posted 2015) [#2]
Samples are your friend. This is covered specifically in the b3d docs. Example and all.


Blitzplotter(Posted 2015) [#3]
I put a 'snakes' server and client in the code archives a while ago, this might help:

http://www.blitzbasic.com/codearcs/codearcs.php?code=2789


Caton(Posted 2015) [#4]
when I add readint in TCPStream but when I put a text it won't define it.


Matty(Posted 2015) [#5]
Thats because youre not putting the string returned from readstring anywhere. You need to assign it to a variable at least.