Re: TCP connection between Obj-C and java program
Re: TCP connection between Obj-C and java program
- Subject: Re: TCP connection between Obj-C and java program
- From: Jens Alfke <email@hidden>
- Date: Thu, 3 Jul 2008 21:37:40 -0700
On 3 Jul '08, at 6:57 PM, Wan, Nathan (CIV) wrote:
I need to make some TCP packet transfers from a mac mini to another
computer somewhere else on the internet. [...] On the mac side, it
seems like the appropriate class to use is NSStream, but seeing the
CocoaEcho example, it seems they are using CFSocket where everything
can be done in NSStream, as documented in http://developer.apple.com/documentation/Cocoa/Conceptual/Streams/Streams.html
. Am I wrong? Is my entire approach flawed?
CocoaEcho uses CFSocket to run the listener socket that accepts
incoming connections. But the TCP connections themselves are managed
with NSStreams.
You might want to look at my MYNetwork micro-framework. It includes
abstract classes TCPClient and TCPListener that you can subclass.
(These were originally derived in part from CocoaEcho, but I've done a
lot of work on them and I doubt many lines of the original code are
left.)
http://mooseyard.com/projects/MYNetwork/
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden