• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ping host and port
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ping host and port


  • Subject: Re: Ping host and port
  • From: Dave Carrigan <email@hidden>
  • Date: Sun, 7 Nov 2010 13:52:11 -0800

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 actually want to determine if a host is listening on a TCP or UDP port. Actually, there is no real way to know if a host is listening on a UDP port unless you also know what particular kind of service is associated with that port and know what to look for when a host receives UDP packets on the port in question. So most likely you mean a TCP port. For that, a combination of socket(2) and connect(2) should tell you what you need to know.

--
Dave Carrigan
email@hidden
Seattle, WA, USA

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Ping host and port (From: Tom Jones <email@hidden>)

  • Prev by Date: Re: CATransaction setCompletionBlock - Nested Transactions bug?
  • Next by Date: Re: Ping host and port
  • Previous by thread: Ping host and port
  • Next by thread: Re: Ping host and port
  • Index(es):
    • Date
    • Thread