Modified classes related InetSubnet and TCPConnection to be more reliable.