[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: May a read a line of text with KSock ?
From:       Thiago Macieira <thiagom () wanadoo ! fr>
Date:       2003-07-17 10:25:40
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Giuseppe Torelli wrote:
>I'm using KSock class with send and recv UNIX functions.
>I know there is QSocket that does this with ReadLine functions
>but I'm getting trouble with it. With Ksock I'm able to read data from
>the web 1K each time I call recv. The problem is that I have to strip
>the HTML off and the QRegExp function need the <HTML TAG> all in
>one line while the recv functions returns a partial <HTML TAG> so the
>QRegExp doesn't work. Do you know any other alternatives or trick ?

Read into a buffer and delay processing until you have enough data. That's how 
any network application works when reading from sockets.

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiagom@mail.com           
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic