bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tcpstream class problem - please help


From: Pavel Tsekov
Subject: Re: tcpstream class problem - please help
Date: Tue, 28 Aug 2001 19:36:52 +0200

Hey Vaclav,

I think its not the ftp but actually the level of the implemenation of
the streambuf functionality into the tcpstream (generally TCPStream)
class. I think it doesnt satisfy all the functionality needed by the
streambuf - unfortunately I dont have the knowldge to confirm this. Btw
do you participate in the development of CommonC++ ? Btw you can try the
code and see what happens .. Its not the protocol in this 
case .. Btw how can I subscribe to the mailing list ? or this email
given on the gnu site is just a forwarder for all the developer which
participiate in the CommonC++ development ?

Vaclav Haisman wrote:
> 
> I don't know the FTP protocol by heart but I remember that FTP uses two
> ports. One port, 21, is for data and the other, 20, is for commands. I
> think you should first read RFC of FTP protocol.
> 
> Vaclav Haisman
> 
> On Tue, 28 Aug 2001, Pavel Tsekov wrote:
> 
> > Hi, there! ;)
> >
> > I've downloaded the 1.5.1 version of the CommonC++ library - I inted to
> > use it to communicate with remote server using sockets. Now I compiled
> > the library and tried to make a simple program which writes and reads
> > from socket using the tcpstream class. The program connects to the ftp
> > command port(21) and send the USER command the waits using is
> > isPending(SOCKET_PENDING_INPUT) and prints what it get from the
> > socket...
> >
> >       tcpstream tcpio("127.0.0.1:21");
> >
> >       if (!tcpio)
> >               cout << "Unable to connect!" << endl;
> >
> >       tcpio << "USER test" << endl;
> >
> >       if (isPending(SOCKET_PENDING_INPUT))
> >               cout << tcpio.rdbuf();
> >
> > Now what happens is that the fpt gets my USER command but I cant get any
> > output from the ftp. All i gets is  a lot of garabage printed to the
> > screen and it wont end until I interreupt it using Control+C... I've
> > tried to do also this "cout << tcpio" but it doesnt help and it writes
> > just a different garbage to the screen.
> >
> > Please anyone help :) If there is a working example of a client which
> > connects to server using tcpstream please send it to me too :)
> >
> > Thanks a lot.
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]