In this page I will attempt to address some issues, which may be helpful to you in some way or other.

 

            "netstat -t -a -p -c"

        where '-t' means TCP sockets, '-a' means sockets at all states otherwise listen sockets may not be shown, '-p' means show process id and         '-c'     means to show the information continuously without requiring to type the command again and again.

Some small programs:

On select

On gethostbyname

On byteorders