How to determine is socket in working state



Hello, All!

I have a TCP server which listens on port, says, 8888 and I need to
know how many clients connections with this port really works. I mean
socket works, if it's in ESTABLISHED state _AND_ any traffic was
sent/received by it.

netstat isn't useful for this situation because of a lot of connections
could be in ESTABLISHED state between listen() and accept() system
calls, but they aren't working. Yes, I know about
/proc/net/ip_conntrack, but I need a portable solution to FreeBSD and
Solaris and I don't want to demand netfilter compiled to kernel from
users.

Does anyone know a portable utility which can help me?

Thanks,

-- Alexander

.



Relevant Pages

  • Re: ActiveX control functionality
    ... it should implement tcp server that listens on some port and do something when client connects. ... The control is a child window and will be destroyed by its parent window when the parent window closes. ...
    (microsoft.public.vc.mfc)
  • Re: Exchange Outgoing E-Mail
    ... Default Web Site is listening on Port 3200, ... However, by default, the Default Web Site listens on Port 80, SSL Port 443, ... please refer to the following link to install the Microsoft ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: More allocating portnumbers....
    ... >>getsockname to retrieve the port allocated. ... number and then retrieve it by a call to getsockname. ... get this portnumber and connect to. ... listens too when I check with netstat. ...
    (comp.os.linux.development.system)
  • Re: [opensuse] Still having problems with syslog-ng syntax
    ... It appears that in the case where we want syslog-ng to listen to a port, ... syslog-ng has a command that globally listens to 'anything' ...
    (SuSE)
  • Re: Please help interpret Sygate Personal Firewall traffic log (ndisuio.sys)
    ... the host listens on port 445 wirelessly? ... the host listens on port 445 wired? ... Given a bluetooth card, the host listens on port 445 bluetoothed? ...
    (comp.security.firewalls)