Re: client/server communication using CFSocket
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