Fix the case issue of basic check in TCPSocket and UDPSocket