
Software communication via winsock control
I'm very new to the winsock control. If I have a program that I want to
communicate with a 'server' via TCP how would I send 'comands' to it. For
example if I want the client to receive the path to a shared file, then
later to receive some other piece of information. Currently I'm using
string 'tags' like "<path>xxxxxxx" ending with a NULL character, so I know
that <path> is giving me a file path.
Seems to be primitive to me, what would be a 'normal' way of software
'banter'?
Secondly, would the winsock control ever time-out after a while or should it
always stay connected even though no data is being transmitted?
Thanks.
Jeff