I've created a small server that appears to set up and publish itself. I then created a small client app that 'sees' the server but fails to connect. The error I'm getting is: Address family not supported by protocol family. The address->sa_family is AF_INET. The socket type is: SOCK_STREAM.

Relevant code (I think):

remoteSocket = socket(socketAddress->sa_family, SOCK_STREAM, 0);
if ( remoteSocket > 0 )
remoteFile = [[NSFileHandle alloc] initWithFileDescriptor:remoteSocket closeOnDealloc:YES];

if ( remoteFile ){
connectResult = connect(remoteSocket, (struct sockaddr *)&socketAddress, sizeof(*socketAddress));
        NSLog (@"%s\n", strerror (errno));
}

Some questions:
How do I tell what protocols an address family supports (or vise versa)?
Do I have to add support for the family to the protocol? If so, any pointers to how?
Am I missing something simple or obvious?

Tony
3CAAM
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to