client/server communication

rolasa

Registered
Hello. I'm trying to write two applications: one is a client and the other is a server using CFSocket. The client is working fine. however, when i try to bind the server socket to a port (using CFSocketSetAddress), this function is returning kCFSocketError. I can't figure out what is wrong.
i tried to do the server with BSD sockets and it worked. but i really need to do it using CFSocket.

anybody got an idea what might be wrong?
 
rolasa said:
Hello. I'm trying to write two applications: one is a client and the other is a server using CFSocket. The client is working fine. however, when i try to bind the server socket to a port (using CFSocketSetAddress), this function is returning kCFSocketError. I can't figure out what is wrong.
i tried to do the server with BSD sockets and it worked. but i really need to do it using CFSocket.

anybody got an idea what might be wrong?

Make sure you're using a port above 1000 for testing.
 
I am using port 2222. I'm sure no one is using that port because i tested my client with a regular BSD socket server abd they communicated well. but when i'm trying to use the high level CFSocket functions, i'm getting the problems i mentioned earlier.

i'm not using carbon. i have a mach-o project in codewarrior 9
 
Back
Top