TCP Server / stream

Blitz3D Forums/Blitz3D Beginners Area/TCP Server / stream

sequoia(Posted 2004) [#1]
I programmed a little multiplayer realtime 3d strategy game which works just fine if I run it on my machine.
If I run the server part on a regular server however, it doesn't seem to be able to establish the connection and I have no idea why. I opened the firewall for the right ports
so that can't be the problem.
It starts up but doesn't seem to be able to create the TCP Server. This may be a very dumb question, but so I wrote it in the beginner section. Don't know much about TCP Server/stream and this is my first multiplayer game.

Help would be great


semar(Posted 2004) [#2]
Without source code it's very difficult to guess and help you out.

Anyway, you can search in the code archive, there are examples which may help you.

Sergio.


electronin(Posted 2004) [#3]
Some source code would be nice...


eBusiness(Posted 2004) [#4]
By chance, it could be that the port is already in use on the server. If your server is broadcasting on the net by normal way, port 8080 at least is alredy in use.


jhocking(Posted 2004) [#5]
This probably won't help this immediate problem, but I recommend downloading BlitzPlay for doing multiplayer. The Lite version is free and it made things really easy for me when I was putting multiplayer in my recent project.

http://www.blitzcoder.com/blitzplay/


sequoia(Posted 2004) [#6]
Thanks for the help everybody!

I still haven't found out why its not running on a regular server. It probably has something to do with the other stuff running on that server I suspect. (It runs fine from my machine )
The problem seems to happen when it gets to the "createtcpserver". It does not return 0 or anything and just hangs there frozen.
If I use my machine as server, it works and if the port is already in use (if I run the server twice) it returns 0 and shuts down like its supposed to.


xlsior(Posted 2004) [#7]
To see if another application already happens to use the port, try this from a command prompt before running your program:

netstat -a | more

It will show you any currently active TCP connections, and ports that the computer is listening on. If another active application is using the same port, it should show up in that list.

If it doesn't... I have no idea what the problem could be. :-)


eBusiness(Posted 2004) [#8]
Well, I don't think we will get on from here without some code.


sequoia(Posted 2004) [#9]
I got it to work. It seemed to have been caused by the other stuff running on the server and now it works just fine with no problems.

Thanks !