The client to server winsock program I am working is constantly sending a waleth of data back and forth. However, I just became aware I can not .senddata with arrays. What would you suggest for send several bits of information at once?
Printable View
The client to server winsock program I am working is constantly sending a waleth of data back and forth. However, I just became aware I can not .senddata with arrays. What would you suggest for send several bits of information at once?
what is in your arrays?
Just strings.
Example:
Public Outgoing(1 to 20) as String
Outgoing(1) = Action
Outgoing(2) = UserID
etc...
Client.Senddata
yeah you are going to have to send each individually unless you can just concat all the strings and send out one big chunk.
you can combine the strings with something that is unique for the strings
for ex.
Outgoing(1)="Hi"
Outgoing(2)="I"
Outgoing(3)="am"
Outgoing(4)="John"
Outgoing(5)="!!!"
for i=1 to Ubound(Outgoing) Step 1
strOut=strOut+Outgoing(i)
next i
you can combine the elements with a "|" sign(Chr(127))
than you can separated them with | as the delimiter
Yeah. Originally I was using the | as a seperator by which to take apart the information, but I am afraid that may end up causing to much thinking with the amount of data that will be sent back and forth from the amount of users at one time.