This is a rather confusing question, and for that I apologize. I wrote a Linux C socket application, the basic structure for a simplified chat server. The server is running on my laptop. The client is Telnet at the moment, until I write the assigned client application (it will be more secure, I hope). I know that there are better applications for sending shared network data from the client end, but I was interested in why something is happening on one Telnet client, but not on the other.
The first Telnet test client was on another Linux laptop. It works as expected. The next, however, was a Blackberry app called BBSSH, which allows for Telnet and SSH connections. I went through the Telnet option and it works too. In addition, this is not entirely true.
The server code makes a normal call readto retrieve a block of data that is treated as a string, i.e. a message. The first client reads until I hit Enter and then sends one line of characters. However, the BB application sends every single character, as if I pressed enter after each of them, which I don't have. Obviously, this has something to do with buffering that certain clients classify as EOL from user input, etc. I just can't identify it.
To illustrate this, the server displays messages received from clients.
First, a message from the Linux client:
client name: this is a test
Now for BBSSH:
client name: t
client name: h
client name: i
client name: s
client name:
client name: i
client name: s
client name:
client name: a
client name:
client name: t
client name: e
client name: s
client name: t
Any help?
Louis source
share