I am wondering how to create a TCP server in Blitzmax?
I noticed the TSocketStream class, but not sure how it works. It uses TStream, so I assume once the connections are set up it works like a stream, but I am not sure how to set up connections.
There is a function CreateClient(server, port), which seems self explainitory enough... except how do we know if the connection fails? How do we know when the connection is broken? Does the function block until it recieves the data it needs?
Also, for creating a server, there is Create(socket), but how does this work? Normally, you would have a seperate server socket object, and you would then call a function that would return a socket object if there was a connection request.
The source code is there, but without proper documentation it seems pretty difficult to do anything with sockets.
I noticed the TSocketStream class, but not sure how it works. It uses TStream, so I assume once the connections are set up it works like a stream, but I am not sure how to set up connections.
There is a function CreateClient(server, port), which seems self explainitory enough... except how do we know if the connection fails? How do we know when the connection is broken? Does the function block until it recieves the data it needs?
Also, for creating a server, there is Create(socket), but how does this work? Normally, you would have a seperate server socket object, and you would then call a function that would return a socket object if there was a connection request.
The source code is there, but without proper documentation it seems pretty difficult to do anything with sockets.