• 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: client/server communication using CFSocket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: client/server communication using CFSocket


  • Subject: Re: client/server communication using CFSocket
  • From: "Justin C. Walker" <email@hidden>
  • Date: Thu, 19 Jan 2006 15:43:31 -0800


On Jan 19, 2006, at 04:24 , Rola Alame wrote:

Hello.

I'm writing two applications: one is a client and the other is a server for them to communicate over the network using TCP/IP. i'm using high level CFSocket function. The client is working fine. however, at the server, i'm successfully creating the socket (with CFSocketCreate), but when i use "CFSocketSetAddress" to bind a port to that socket, it's returning kCFSocketError. and i can't figure out why. Here's the code for the server:

Part of your problem is here:

if (address != NULL)
{
CFSocketError err = CFSocketSetAddress (server, address);
if (err == kCFSocketError)
printf("error binding socket to address\n";
}

The system will tell you why you received an error if you ask it; if CoreFoundation doesn't have a system error printout, try using "perror (3)".


Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
If you're not confused,
You're not paying attention
--------



_______________________________________________
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: 
 >client/server communication using CFSocket (From: "Rola Alame" <email@hidden>)

  • Prev by Date: Re: client/server communication using CFSocket
  • Next by Date: Re: client/server communication using CFSocket (no one listening to port 2222)
  • Previous by thread: client/server communication using CFSocket(what is this port problem?)
  • Next by thread: client/server communication using CFSocket. perror result
  • Index(es):
    • Date
    • Thread