So I am using TCP sockets and currently I am doing it something like this:
Notice how I send off the whole message in one send() function, and same with receiving. I have a feeling that this is faster for the network put possible slower on the cpu because I am using the bank streams.
The other way is simply this:
What I want to know is this: is this any slower (..or faster) than my top method?
'---------SENDING------------ BankStream.WriteDouble(something) BankStream.WriteLine(somethingelse) Sock.Send(BankStream._bank._buf, BankStream._bank._size) '--------RECIEVING-------------- Local Buf:Byte[Sock.ReadAvail()] sock.Recv(Buf, sock.ReadAvail) BankStream.Write(Buf, sock.ReadAvail) BankStream.Seek(0) 'interpret Print BankStream.ReadDouble() Print Bankstream.ReadLine()
Notice how I send off the whole message in one send() function, and same with receiving. I have a feeling that this is faster for the network put possible slower on the cpu because I am using the bank streams.
The other way is simply this:
'---------SENDING------------ SockStream.WriteDouble(something) SockStream.WriteLine(somethingelse) '--------RECIEVING-------------- Print SockStream.ReadDouble() Print Sockstream.ReadLine()
What I want to know is this: is this any slower (..or faster) than my top method?