programming with tcpsvd / tcpclient

"Thomas Delaet" <[email protected]>
Newsgroups gmane.comp.misc.pape.general
Message-ID <[email protected]>
Hi,

I want to quickly prototype some networking ideas with
tcpsvd/tcpclient. Thing is that I'm not sure on how to sent a
combination of text / binary data using standard output / standard
input in combination with tcpsvd / tcpclient.

To be concrete, I want to sent the following type of messages from the
client to the server: <file-identification-length (integer)>
<file-identification (string)> <start-byte (integer)> <length
(integer)> <binary payload>

<binary payload> is a partial file from the filesystem (starting from
start-byte and with the specified length.

Does anyone has any pointers on how to accomplish this? Do I need to
worry about network byte ordering and differences between
architectures or do tcpsvd/tcpclient take care of this? In the latter
case, is is then sufficient to convert the integers and strings to
bytes and just cut the necessary portion from the file and print it on
standard output?

Thanks a lot in advance

Kind Regards
-- 
Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.