有没有区别
shutdown($socket, 0) if $socket;
shutdown($socket, 2) if $socket;
close($socket) if $socket;
和
shutdown($socket, 2) if $socket;
close($socket) if $socket;
也有区别
shutdown($socket, 1) if $socket;
shutdown($socket, 2) if $socket;
close($socket) if $socket;
和
shutdown($socket, 2) if $socket;
close($socket) if $socket;
最后是close
需要的吗?