Hi,
I am getting a lin of socket and using Readline() provided by Common
C++. getline() reads input from iostream.....
Regards,
Seenu.
David Sugar wrote:
Why are you using Readline() rather than getline()?
Srinivasa T.N. wrote:
David Sugar wrote:
gcount() should return the number of bytes received from the last
stream operation.
Srinivasa T.N. wrote:
Hi All,
In TCPSession, we can do "*tcp >>" insted of "recv" on the
socket. But, Is there way to find the length of the buffer I
received with >>, because I can do something like length == -1 or
length == 0......
Or, is it that I have to construct a class of my own deriving it
from SocketPort and Thread...
Regards,
Seenu.
I am using TCP fo communicating between Server and Client. In
Server, I want to read line by line that is sent by Client. I am
using Readline() function in Socket class. I want to check error,
but I dont want to use exceptions. After Readline, gcount()
alwaysreturn the length read or 0. If my client gets ^C, then at
server gcount() returns me 0 (normally recv returns 0 but on other
conditions -1, but gcount() always retuns +ve or 0).. Due to this,
my check is failing, what should I do for that????
Regards,
Seenu.