• 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
No new connections after exception on writeData:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No new connections after exception on writeData:


  • Subject: No new connections after exception on writeData:
  • From: Andreas Pardeike <email@hidden>
  • Date: Tue, 15 Feb 2005 14:21:30 +0100

Hello,

I can't get my network code to listen again after the client disconnected.
What I have done so far with success:


Using NSFileHandle to listen to incoming connections. Reading the request
and sending out data. But when I call writeData: and the client is already
gone then I get an exception and the posix error is 61. Here's the piece
of that code:


		NS_DURING
			[myStream writeData:buffer];
		NS_HANDLER
			NSLog(@"sending error - restart listening");
			[myStream closeFile];
			[myStream acceptConnectionInBackgroundAndNotify];
		NS_ENDHANDLER

The problem: I never get any new connections again without stopping and starting
the whole bind/listen cycle. On a second handle, I only receive data and then
close the connection with closeFile & acceptConnectionInBackgroundAndNotify and
there I am successfully receiving as many new requests as I want.


What am I doing wrong?

Regards,
Andreas Pardeike

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Formatting integer value
  • Next by Date: Re: Casting from NSArray to a custom class
  • Previous by thread: Re: Implementing the Dock genie effect in windows
  • Next by thread: Out-of-order enter/exit events
  • Index(es):
    • Date
    • Thread