Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Carbon socket implementation?

Carbon socket implementation?
Thread Tools
Fresh-Faced Recruit
Join Date: May 2004
Status: Offline
Reply With Quote
May 4, 2004, 05:41 PM
 
I have a Classic application that, given a host address and a port number, connects to a socket at this address and sends/receives messages. What I want to do is create a Carbon app that can open a socket on a localhost port and communicate with the Classic app. However it seems that Classic applications are incapable of recognizing CFSockets, so what I need to do is to implement sockets using the Carbon OpenTransport API. this, in a word, sucks. Anyone know of existing C libraries that have already done this, that I could use in Xcode?
     
qyn
Dedicated MacNNer
Join Date: Dec 2000
Location: sj ca
Status: Offline
Reply With Quote
May 5, 2004, 01:40 AM
 
I find it strange that classic applications would care what kind of a socket is on the other end. If CFSocket correctly implements the Berkely socket APIs (which is claims to), then any socket in the world should work.

Are you perhaps using some protocol that sits on top of the socket?

In any case, you can always use the raw APIs. This involves things like socket(), connect(), listen(), etc. There's a ton of documentation online about how to do this. It's not particularly difficult, but takes a bit of getting used to.

If you want to use some Cocoa, you might check out the smallsockets library. It handles a lot of the nasty work for you. (It's also a good reference for understanding sockets in general since the code is pretty clean and readable.)

I'd be interested in seeing more information about what exactly is going wrong with the CFSockets...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:29 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2