TCP Server doesn't work

Blitz3D Forums/Blitz3D Programming/TCP Server doesn't work

panton(Posted 2008) [#1]
Hey there. I've got a problem with my TCP server...
I used:
CreateTCPServer(port)

and I tested this on my friends computer:
OpenTCPStream(IP of server computer,port)

But the client can't find the server.
Why???
Can anybody help me?


panton(Posted 2008) [#2]
Can anybody help me!??!? No body!?!?


KillerX(Posted 2008) [#3]
Can you post all your code?


panton(Posted 2008) [#4]
Yes.
here's the code:

<removed>


KillerX(Posted 2008) [#5]
Can you also post the client code?


panton(Posted 2008) [#6]
ok wait...


panton(Posted 2008) [#7]
;Create a Client

strmGame=OpenTCPStream(Ip of the server computer,8080)

If strmGame<>0 Then
Print "Client Connected successfully."
Else
Print "Server failed to connect."
WaitKey
End
End If

; write stream to server
WriteString strmGame,"A player joined the server..."
Print "COnnection succesfull"


GfK(Posted 2008) [#8]
Without looking at any of your code (which isn't formatted/indented so I can't be bothered, tbh), in all probability you need to set up port forwarding on your router.

Without that, its safe to assume that no TCP client/server code will work.


panton(Posted 2008) [#9]
So i have to setup port forwarding (8080) ??


panton(Posted 2008) [#10]
Thanks! I've tried to open port with port forward (port=8080) and it works now!! THANKKS!!!