Re: TCP question
From: Adam Goossens (adamgoossens_at_users.sourceforge.net)
Date: 01/26/05
- Next message: Peter Proost: "Re: Which is First Form in Project?"
- Previous message: Adam Goossens: "Re: Which is First Form in Project?"
- In reply to: Nikolay Petrov: "TCP question"
- Next in thread: Nikolay Petrov: "Re: TCP question"
- Reply: Nikolay Petrov: "Re: TCP question"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 Jan 2005 18:09:10 +1030
Hi Nikolay,
All TCP data is transmitted as a series of bytes. It's your
responsibility to determine a proper higher-level protocol for these
bytes so you know what you're looking at.
Take the MSN protocol for example. Sometimes you receive a command that
contains binary data. The first part of the command is a Command String
(a straight Byte-To-ASCII conversion) which gives you the important
information about the command (most notably the type of command and the
length of the incoming data). You download the amount of data the
command tells you it has sent, and then judge what to do with that data
based on the command you received.
I personally would do something similar in your server and client. I
would decide on a protocol to be applied on top of TCP to designate what
sort of data you are transmitting.
Regards,
-Adam.
Nikolay Petrov wrote:
> I need to transfer different types of data from my tcp client to my tcp
> server - string, bynary, datasets.
> Ho to know what exactly data I receive?
>
>
- Next message: Peter Proost: "Re: Which is First Form in Project?"
- Previous message: Adam Goossens: "Re: Which is First Form in Project?"
- In reply to: Nikolay Petrov: "TCP question"
- Next in thread: Nikolay Petrov: "Re: TCP question"
- Reply: Nikolay Petrov: "Re: TCP question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|