Re: Cleanup inside a failed init method
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