Since no one is answering my questions on the other thread, I created this one! For some reason, whenever I create a TCP server, once a client is created, the server only will receive one measly message from the client.
I thought maybe I coded it incorrectly, so I used the sample, but changed it to a repeating loop, and the same thing happened. Here is the sample:
This is the server code:
And here is the client code:
Can anyone help me?
I only have the first version of Blitz3D, so could there be an update for this?
I thought maybe I coded it incorrectly, so I used the sample, but changed it to a repeating loop, and the same thing happened. Here is the sample:
This is the server code:
svrGame=CreateTCPServer(8080) If svrGame<>0 Then Print "Server started successfully." Else Print "Server failed to start." End End If While Not KeyHit(1) strStream=AcceptTCPStream(svrGame) If strStream Then Print ReadString$(strStream) Delay 2000 Else Print "No word from Apollo X yet ..." Delay 1000 End If Wend End
And here is the client code:
strmGame=OpenTCPStream("127.0.0.1",8080) If strmGame<>0 Then Print "Client Connected successfully." Else Print "Server failed to connect." WaitKey End End If While Not KeyDown(1) WriteString strmGame,"Mission Control, this is Apollo X ..." Print "Completed sending message to Mission control..." Wend End
Can anyone help me?
I only have the first version of Blitz3D, so could there be an update for this?