how to send array using winsock???
VB Code:
dim abc(10) as string winsock.sendData (abc()) 'can it work??
Printable View
how to send array using winsock???
VB Code:
dim abc(10) as string winsock.sendData (abc()) 'can it work??
Nope, you have to send each element separately. Put a character between each one so the other side can translate them. A ~ is usually a good choice.
Sending an array with winsock is possble. Remember though that the data you send should be a string, so convert the array into a string, separating each element with a comma.
VB Code:
Dim strArray As String strArray = Join(abc, ",") winsock.sendData strArray
At the receiving end, simply use the split function to reconstruct the array:
VB Code:
abc = Split(strArray, ",")