• 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: CFSocket on Windows?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSocket on Windows?


  • Subject: Re: CFSocket on Windows?
  • From: OL&L Lists <email@hidden>
  • Date: Mon, 11 Apr 2005 12:00:02 -0700

At 10:54 AM +0100 4/11/05, Quinn wrote:
At 23:32 -0700 10/4/05, OL&L Lists wrote:
Is there a way to use a CFSocket as a replacement for a SOCKET in WIn32 code?

No.

I have some existing Win32 winsock code I woul like to port to OS X.

CF has a bunch of code to deal with Windows due to its heritage (this feature isn't supported by Apple, but it's clearly visible in the Darwin source). However, the code is for /implementing/ CF on top of Windows, not for implementing Windows on top of CF. Thus, CFSocket will not help you port WinSock code to Mac OS X.


OTOH, if you wanted to port some CFSocket code /to/ Windows, you might be able to do it by using the Darwin code (subject to the APSL, of course).

I see.

Well, my approach is to define a massive WIn-to-Mac mapping layer that maps all the Windows types to Mac types in which I map SOCKET to CFSocket. I've done huge mapping files like this in the past and they work except that the Windows code has to be conditionalized where calls are made to Windows APIs so that the Mac APIs can be called instead.

I'm porting a pretty huge Windows networking app and there is so much existing networking logic that I thought this would be the best approach. If it doesn't work, I may just have to throw the whole thing out and rewrite it from the ground up.

Thanks for your help.

Michael
Orbital Launch & Lift, Inc.
http://www.orbitallaunch.com
_______________________________________________
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


  • Follow-Ups:
    • Re: CFSocket on Windows?
      • From: Douglas Davidson <email@hidden>
References: 
 >CFSocket on Windows? (From: OL&L Lists <email@hidden>)
 >Re: CFSocket on Windows? (From: Quinn <email@hidden>)

  • Prev by Date: Re: CFHost and Rendezvous names
  • Next by Date: Re: CFSocket on Windows?
  • Previous by thread: Re: CFSocket on Windows?
  • Next by thread: Re: CFSocket on Windows?
  • Index(es):
    • Date
    • Thread