Questions regarding BRL.Sockets, BRL.SocketStream

BlitzMax Forums/BlitzMax Beginners Area/Questions regarding BRL.Sockets, BRL.SocketStream

Flemmonk(Posted 2009) [#1]
I have done quiet a bit of application programming in the past with sockets with several different languages and platforms, but the Blitz documentation I found was a little lacking (TSocket is not documented).

With regards to TSocket class and TCP sockets using CreateTCPSocket is anyone able to tell me if the commands under TSocket are blocking or non-blocking?

Additionally since TSocket is not documented what are the flags for on the Send method?

Lastly, I am asuming I can combine TSocket with SocketStream so I can read and write the available data as I please. So am I right in asuming this has a Receive and Send buffer that the Read/Write methods interact with? And do I have to utilise the Flush method to complete the send?


plash(Posted 2009) [#2]
With regards to TSocket class and TCP sockets using CreateTCPSocket is anyone able to tell me if the commands under TSocket are blocking or non-blocking?
I think it is blocking.

Additionally since TSocket is not documented what are the flags for on the Send method?
Hmm, I'm not sure; I've never noticed that parameter before.
I haven't seen any implementations that use that field (including my own), so it's probably best left as default (0).

Lastly, I am asuming I can combine TSocket with SocketStream so I can read and write the available data as I please.
Correct.

So am I right in asuming this has a Receive and Send buffer that the Read/Write methods interact with?
Read = Recv and Write = Send (the methods for the TSocketStream type wrap the socket's methods).

And do I have to utilise the Flush method to complete the send?
Uhhh.. I'm not sure on that one.

EDIT: No, you do not need to flush the SocketStream/Socket.