Re: DO Client can't connect, problem with code or Airport firewall?
Re: DO Client can't connect, problem with code or Airport firewall?
- Subject: Re: DO Client can't connect, problem with code or Airport firewall?
- From: Keith Gugliotto <email@hidden>
- Date: Fri, 26 Apr 2002 20:34:31 -0500
Drew:
I believe at least one pitfall with -[NSSocketPort
initRemoteWithTCPPort:host:] is it appears to only work with actual
hostnames. Try using -[NSSocketPort initRemoteWithProtocolFamily:PF_INET
socketType:SOCK_STREAM protocol:IPPROTO_TCP address:address] - with a
properly configured struct sockaddr_in encoded in the NSData address.
See:
http://www.omnigroup.com/mailman/archive/macosx-
dev/2001-August/018180.html
I know for a fact AirPort does not hurt DO - works fine on my local
network (with NAT) with my own projects as long as I use a hostname in
-[NSSocketPort initRemoteWithTCPPort:host:].
Also, at least my company's firewall does not interfere with DO, as I
connected a client from behind that firewall to a server running behind
my own firewall at home without a problem - the only requirement being
to set the router up to forward traffic for the specified port to the
actual server hardware.
On Wednesday, April 24, 2002, at 01:30 PM, Drew Cunningham wrote:
Could someone please look at my DO code? The client portion can't seem
to
connect, and I don't know if it is my code, or the fact that the network
is through Airport. Thanks in advance!
NSPort *localPort, *transferPort;
unsigned short portAddress = 1331;
localPort = [[NSSocketPort alloc] init];
if( [clientCell state] == NSOnState ) // in case of client
{
transferPort = [[NSSocketPort alloc]
initRemoteWithTCPPort:portAddress host:@"10.0.1.201"];
theConnection = [NSConnection connectionWithReceivePort:localPort
sendPort:transferPort];
sharedData = [[theConnection rootProxy] retain];
}
keith gugliotto
email@hidden
kgugliotto on AOL Instant Messenger
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.