network socket help

BlitzMax Forums/BlitzMax Beginners Area/network socket help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi,

Yes it is 'normal' for clients to recieve data from the server, it all depends on your application.

Your query about timings : Not necessary (unless you really want it) but TCP is guaranteed to reassemble individual packets into the correct order before you get to pull them from the buffer. (I presume this is why you are asking).

Your query about users/passwords : This is a matter of you designing your own protocol above TCP. Essentially you should establish a protocol whereby the client is validated by the server, maybe something like this :-

a) client connects to server
b) server responds with a message to request you to log in
c) client sends login details (encypted)
d) server validates the login details and either accepts or rejects the client.

The above scenario will require you to implement some kind of state machine for the protocol to work properly.