[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recv in TCPSession
From: |
Srinivasa T.N. |
Subject: |
Re: recv in TCPSession |
Date: |
Sun, 03 Jun 2001 09:26:16 +0530 |
User-agent: |
Mozilla/5.0 (X11; U; Linux 2.2.14-5.0 i686; en-US; m18) Gecko/20010131 Netscape6/6.01 |
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.
--
-----------------------------------------------------------------------------
If not here, you can reach me at address@hidden
C-DOT, 71/1, Sneha Complex, Miller Road, Bangalore - 560 052
Ph: 226 3399 Ext: 268 Direct: 238 3951 (Off)
363 1707 (Resi)