RE: Ping host and port

2010-11-08 Thread Shawn Bakhtiar
directly into its library. > From: tjo...@acworld.com > Date: Sun, 7 Nov 2010 15:16:30 -0800 > To: d...@rudedog.org > CC: cocoa-dev@lists.apple.com > Subject: Re: Ping host and port > > thanks a bunch, this is great! > > tom > On Nov 7, 2010, at 2:40 PM, Dave Carrig

Re: Ping host and port

2010-11-07 Thread Tom Jones
thanks a bunch, this is great! tom On Nov 7, 2010, at 2:40 PM, Dave Carrigan wrote: > > On Nov 7, 2010, at 2:31 PM, Kyle Sluder wrote: > >> On Nov 7, 2010, at 2:24 PM, Tom Jones wrote: >> >>> Ops, thanks! >>> >>> I have not really done much with sockets. Is there an example you know of >>>

Re: Ping host and port

2010-11-07 Thread Dave Carrigan
On Nov 7, 2010, at 2:40 PM, Dave Carrigan wrote: > > On Nov 7, 2010, at 2:31 PM, Kyle Sluder wrote: > >> On Nov 7, 2010, at 2:24 PM, Tom Jones wrote: >> >>> Ops, thanks! >>> >>> I have not really done much with sockets. Is there an example you know of >>> that I can learn from? >> >> THE

Re: Ping host and port

2010-11-07 Thread Dave Carrigan
On Nov 7, 2010, at 2:31 PM, Kyle Sluder wrote: > On Nov 7, 2010, at 2:24 PM, Tom Jones wrote: > >> Ops, thanks! >> >> I have not really done much with sockets. Is there an example you know of >> that I can learn from? > > THE guide to socket programming: http://beej.us/guide/bgnet/ Specifi

Re: Ping host and port

2010-11-07 Thread Kyle Sluder
On Nov 7, 2010, at 2:24 PM, Tom Jones wrote: > Ops, thanks! > > I have not really done much with sockets. Is there an example you know of > that I can learn from? THE guide to socket programming: http://beej.us/guide/bgnet/ --Kyle Sluder > ___ Co

Re: Ping host and port

2010-11-07 Thread Tom Jones
Ops, thanks! I have not really done much with sockets. Is there an example you know of that I can learn from? Thanks, tom On Nov 7, 2010, at 2:14 PM, Dave Carrigan wrote: > On Nov 7, 2010, at 2:02 PM, Tom Jones wrote: >> Thanks, yes its a tcp port. I tried this but for some reason "port" is

Re: Ping host and port

2010-11-07 Thread Dave Carrigan
On Nov 7, 2010, at 2:02 PM, Tom Jones wrote: > Thanks, yes its a tcp port. I tried this but for some reason "port" is always > nil. > > NSSocketPort *port = [[NSSocketPort alloc] initRemoteWithTCPPort:3651 > host:@"localhost"]; > if(!port) { > NSLog(@"Port is open..."); > } else { > NSLog

Re: Ping host and port

2010-11-07 Thread Scott Ribe
On Nov 7, 2010, at 3:02 PM, Tom Jones wrote: > if(!port) { > NSLog(@"Port is open..."); > } else { > NSLog(@"Port is not open..."); > } Isn't that backwards? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice __

Re: Ping host and port

2010-11-07 Thread Tom Jones
Thanks, yes its a tcp port. I tried this but for some reason "port" is always nil. NSSocketPort *port = [[NSSocketPort alloc] initRemoteWithTCPPort:3651 host:@"localhost"]; if(!port) { NSLog(@"Port is open..."); } else { NSLog(@"Port is not open..."); } [port release]; Thanks, tom On

Re: Ping host and port

2010-11-07 Thread Kyle Sluder
On Nov 7, 2010, at 1:35 PM, Tom Jones wrote: > Hello, > I'm looking for a simple way to ping a host and a specific port on that host. > I have SCNetworkCheckReachabilityByName working just fine but I really need > to test to see if the port is active. There's no such thing as pinging a port.

Re: Ping host and port

2010-11-07 Thread Dave Carrigan
On Nov 7, 2010, at 1:35 PM, Tom Jones wrote: > I'm looking for a simple way to ping a host and a specific port on that host. > I have SCNetworkCheckReachabilityByName working just fine but I really need > to test to see if the port is active. ICMP (ping) doesn't use ports. I assume you actuall