• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SmallSockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SmallSockets


  • Subject: Re: SmallSockets
  • From: Thomas Deniau <email@hidden>
  • Date: Wed, 31 Oct 2001 12:16:05 +0100

Le 31/10/01 12:05, Kent Karlsson disait :

>
> On onsdag, oktober 31, 2001, at 11:51 , Thomas Deniau wrote:
>
>> Hi ! I'm using Steven Frank's Small Sockets to connect to an IRC server.
>> But it seems that the while ( [socket readData:response] )
>> loop
>> keeps looping even when the server has closed the connection ...
>
> The response is a allocated NSData with 0 length, not nil..
>
> So change to:
>
> while ([socket readData:response] && [response length])

No, because the IRC server may as well send me nothing during a few minutes
if nothing happens ... I want to know if the socket has been DISCONNECTED.

So I use while ([socket isConnected] && [socket readData:response])
.. But the isConnected always returns TRUE even when the server has closed
the connection ...

--
Thomas Deniau


  • Prev by Date: SmallSockets
  • Next by Date: SetAspectRatio Display size
  • Previous by thread: SmallSockets
  • Next by thread: SetAspectRatio Display size
  • Index(es):
    • Date
    • Thread