• 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: CFNetwork port to Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFNetwork port to Intel


  • Subject: Re: CFNetwork port to Intel
  • From: Frederick Cheung <email@hidden>
  • Date: Fri, 29 Jun 2007 16:33:59 +0100


On 29 Jun 2007, at 15:34, Jeff Heyob wrote:

Fred,
Thanks for looking at my code.
It looks like I need more sleep.
The first thing that I saw in your reply was your change of my BigToHost into HostToBig.
That's not actually important: a swap is a swap (although it's obviously a million times more readable if you get it right)

Fred.
It took me a couple more looks to see the 32 that I had mistakenly used.
Thanks for the catch!
It is working now.
Thanks,
Jeff



On Jun 29, 2007, at 9:45 AM, Frederick Cheung wrote:


On 29 Jun 2007, at 14:30, Jeff Heyob wrote:

Hi,
I have CFNework code that sets up a listening socket to accept incoming connection requests. It has been working fine when built against sdk10.3 using Xcode 2.4.1. I recently ported the supporting app to Intel against sdk10.4. The PPC built of the CFNetwork code works fine , but the Intel CFNetwork code doesn't respond to any connection requests.
Here is the code. The "OpenListener" code executes with no error. There is no response to connection requests in the "ServerCall" code. I've tried the listenPort integer as both little and big endian with no luck.


I would really appreciate any help to get this to work on Intel.
Thanks,
Jeff

struct sockaddr_in addrs = {8,AF_INET,CFSwapInt32BigToHost (listenPort),{0}};

ports are 16 bit things, so you need htons or CFSwapInt16HostToBig, not CFSwapInt32HostToBig

Incidentally lsof is good for checking if your code is listening on the port you think it is.

Fred


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >CFNetwork port to Intel (From: Jeff Heyob <email@hidden>)
 >Re: CFNetwork port to Intel (From: Frederick Cheung <email@hidden>)
 >Re: CFNetwork port to Intel (From: Jeff Heyob <email@hidden>)

  • Prev by Date: Re: CFNetwork port to Intel
  • Previous by thread: Re: CFNetwork port to Intel
  • Index(es):
    • Date
    • Thread