• 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: Cleanup inside a failed init method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cleanup inside a failed init method


  • Subject: Re: Cleanup inside a failed init method
  • From: Ken Tozier <email@hidden>
  • Date: Sat, 6 Dec 2008 17:22:07 -0500

It's a matter of preference I guess. In practice, I can't think of any reason to connect to a server unless you intend to talk to it, so I just wrapped up all the ugliness into a nice simple interface. Creating one of my KClientSockets, connects to the host and retrieves any handshake data automatically.

For example: To connect to MySQL on the local machine
KClientSocket *socket = [KClientSocket connectToHost: @"localhost" port: 3306];
KSocketStream *handshake = [socket stream];


Done


On Dec 6, 2008, at 4:58 PM, Steven W Riggins wrote:

Should initWithHost be doing anything other than caching the host info?

Other methods should do the connection/verification etc, no?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Cleanup inside a failed init method (From: Ken Tozier <email@hidden>)
 >Re: Cleanup inside a failed init method (From: Steven W Riggins <email@hidden>)

  • Prev by Date: Re: What are the limitations of Dot Syntax?
  • Next by Date: Re: Cleanup inside a failed init method
  • Previous by thread: Re: Cleanup inside a failed init method
  • Next by thread: Re: Cleanup inside a failed init method
  • Index(es):
    • Date
    • Thread