• 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: Problem with socket timeout (Similar to :CFSocket and CFRunLoopRun questions).
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with socket timeout (Similar to :CFSocket and CFRunLoopRun questions).


  • Subject: Re: Problem with socket timeout (Similar to :CFSocket and CFRunLoopRun questions).
  • From: Richard Schreyer <email@hidden>
  • Date: Thu, 27 Jun 2002 10:30:27 -0700

The socket calls are blocking until they either finish or time out. While you can create non-blocking sockets, the best way to go about solving this is to move all of the socket calls into a separate thread.

Anyhow, I also doubt that your system speed is affected at all by you app being blocked. Your app is sleeping waiting for a response from the kernel rather than waiting in a loop. It shouldn't be taking any CPU time at all.

Richard Schreyer


On Thursday, June 27, 2002, at 01:30 AM, Devdutt Patnaik wrote:

Hi everyone,
Since you guys were discussing about CFSocket, I
thought that I'd add my query as well. Well, I am new
to socket programming, and I have written an app that
uses sockets to connect to a server. I am not using
CFSocket, but use simple BSD sockets. I am using
connect(), send() and recv() for communications with
the server. Now, in case the specified server to which
a connection is sought is dead, or the servername
specified is incorrect(I take in a servername from the
user),or in case a recv takes a long time, I see the
spinning cursor, and the performance of other apps
running on my machine is affected. I cannot quit the
app during this period via the menu. This happens
until the call times out on its own. So what can I do
to solve this problem ? Please help. I need urgent
advise.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Fast proxying
  • Next by Date: NSBitmapImageRep and 0RGB data
  • Previous by thread: NSCalendarView?
  • Next by thread: NSBitmapImageRep and 0RGB data
  • Index(es):
    • Date
    • Thread