[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cplusplus-devel]CommonC++(TCPStream) Question
From: |
Sebastian Wain |
Subject: |
Re: [Cplusplus-devel]CommonC++(TCPStream) Question |
Date: |
Tue, 4 Sep 2001 13:41:28 -0300 |
The port 23 was open, but I think the protocol initial negotiation was the
problem.
I finally used the getline() in other port sucessfully.
Thank You
Sebastian Wain
On Tue, 4 Sep 2001 13:52:06 +0200
Federico Montesino Pouzols <address@hidden> wrote:
> On Wed, Aug 29, 2001 at 03:28:53PM -0300, Sebastian Wain wrote:
>
> > I was testing the CommonC++ 1.5.1 libraries under Linux, I tried to
> > test the use of the TCPStream class in an trivial TCP client but I
> > don't know how to do a trivial read from the socket (using the
> > iostream logic). I attach the source.
>
> Hi,
>
> Have you been able to compile and run demo/tcpthread on your
> box? If so, you should have no problem. But be careful, take into
> account that you are trying to connect to port 23 (usually telnet),
> and if there is no telnet server on that host, the constructor
> `TCPStream client(add,23) will throw and exception (because connection
> fails). This is not a fault but a feature of Common C++; you can also
> specify arguments to the constructor in order to not throw exceptions.
>
> Try other ports where you are sure there are servers
> listening.
>
> I attach two modified tcpclients. In the first, the TCPStream
> constructor does not throw exceptions. In the second, exceptions are
> not disabled in the TCPStream constructor.
>
> I have had some problems with the second one, but I will
> comment it in other post...
>
> > Thank You
> > Sebastian Wain
>
>
>
>