close(sockfd);关闭socket,不管该socket上是否有没收万的数据,还是未发送的数据,强行关闭socket读和写.int shutdown(int sockfd,int how);关闭socket ,但是要看第二个参数how参数 how允许为shutdown操作选择以下几种方式: