.Net using Chr() to parse text
Posted
by Marcx
on Stack Overflow
See other posts from Stack Overflow
or by Marcx
Published on 2010-03-07T13:24:08Z
Indexed on
2010/04/01
15:03 UTC
Read the original article
Hit count: 168
I'm building a simple client-server chat system.
The clients send data to the server and the server resends the data to all the other clients. I'm using the TcpListener and Network stream classes to send the data between the client and the server.
The fields I need to send are, for example: name, text, timestamp, etc. I separate them using the ASCII character 29.
I'm also using ASCII character 30 to mark the end of the streamed data.
The data is encoded with UTF8..
Is this a good approach? Will I run into problems? Are there better methods?
UPDATE:
Probably my question was misunderstood, so I explain it better.. Suppose to have a list of data to send from client to server, and suppose to send all the data in only one stream, how do you send these data?
- Using a markup
- Using a character as a delimiter
- Using a fixed length for every fields
© Stack Overflow or respective owner