Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i send a variable, a vector an array through Winsock?

Status
Not open for further replies.

neptune2k

Technical User
Jun 21, 2002
13
IT
hi...
i have a question a bout winsock.
i want to realize with visual basic 6 a client/server application.
now, i trying to send from client side to a server side and viceversa variables, vectors and array.
With variables, no problem. but i have problem to send a vector of 10 elements.

in server side i have created a command button to send vecotr:

private sub cmdSend_click()
for i = LBound(vetctor) to UBound(vector)
tcpServer.SendData vector(i)
next i
end sub

in client_side:
private sub tcpClient_DataArrival(ByVal bytesTotal As Long)
....
end sub

where tcpClient is the winsock control in Client Side.

i don't know which code i must put in .... to recieve a vector or an array.

Can someone help me?
 
Can't you transmit the ten values as ten variables, then
reassemble them as an array once they arrive?
"If it works ..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top