• 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: Tool/Approach to look at a CFSocket ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tool/Approach to look at a CFSocket ?


  • Subject: Re: Tool/Approach to look at a CFSocket ?
  • From: Justin Walker <email@hidden>
  • Date: Sat, 22 Mar 2003 12:38:49 -0800

On Saturday, Mar 22, 2003, at 00:36 US/Pacific, Lance Drake wrote:

hi 'macnetworkprog' people,

Is there a preferred way or tool to use to see what it is your CFSocket is up to?

My situation is that I have opened a CFSocket and an external socket has successfully connected with my CFsocket. We're connecting at an agreed upon port #.

My socket called has (supposedly) been registered to be called from within the context of a CFRunLoopRun() by first creating the RunLoopsourceRef and then adding it to the current RunLoop.

I am first surprised that the Callback routine doesn't get called at such time as the external caller initially attempts to connect. Still, the caller thinks everything is OK at this end.

An external message (supposedly) gets sent to my socket but the callback routine still does not trigger. So where did the ball get dropped? Perhaps you have an idea of how I might better understand what the is the state of the situation?

Not sure if this is what you want, but 'netstat' will show you some information about the kernel state associated with your "socket". 'netstat -ta' will give you a (longish) list that looks something like this:

Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 blah.58875 mail.mac.com.imap ESTABLISHED
tcp4 0 0 *.6000 *.* LISTEN
tcp4 0 0 *.* *.* CLOSED
tcp4 0 0 *.* *.* CLOSED
tcp4 56 0 blah.55013 ftp.informatik.t.ftp CLOSE_WAIT
tcp4 56 0 blah.54094 ftp.informatik.t.ftp CLOSE_WAIT
tcp4 87 0 blah.54085 ftp.informatik.t.ftp CLOSE_WAIT
tcp4 56 0 blah.52325 ftp.informatik.t.ftp CLOSE_WAIT
tcp4 0 0 localhost.1033 localhost.1007 ESTABLISHED
tcp4 0 0 localhost.1007 localhost.1033 ESTABLISHED

This shows you the state of each socket in use on your system, including the amount of data queued for sending (e.g., if the other end has shut down the TCP window); the amount in the receive queue, waiting for the application to read; and the state of the connection. See the man page for details.

HTH.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | If you're not confused,
| You're not paying attention
*--------------------------------------*-------------------------------*
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Tool/Approach to look at a CFSocket ? (From: Lance Drake <email@hidden>)

  • Prev by Date: Tool/Approach to look at a CFSocket ?
  • Next by Date: Full duplex communication
  • Previous by thread: Tool/Approach to look at a CFSocket ?
  • Next by thread: Full duplex communication
  • Index(es):
    • Date
    • Thread