PDA

Click to See Complete Forum and Search --> : send a multi-function command from a client to a server, useing winsock


Waco_Jaco
Dec 17th, 2000, 08:07 PM
im new to the winsock control...

i have created a server, and a client which successfully connect, and send and receive data. i want to be able to send one string of data to the server which the server can split up and use those separate strings to execute different commands.

e.g.
i want to send a (one single) string to the server which tels it to display a message box. when the string arives the server splits the string int the folloing variabls

strCMD = "1"

'the command to execute in this case a message box.

strPar1 = "Error!"

'the first parameter for the message box in this case the message box title.

strPar2 = "This is a message from the client!"

'the second Parameter for the message box, in this case, the message to be displayed.

strPar3 = "4096"

' the type of message box to be displayed, in this case system modal.


i have developed ways of acheiving this but they are unreliable and constantly cause errors. if i could send a string array, that would be perfect, but i cannot work out how to do that.

please tell me what to do!!!