[UNIX系统管理高手].Perl.Socket.API
while ( $from_who = accept( CLIENT_SOCK, TCP_SOCK ) ) { my $data; $from_who = recv( CLIENT_SOCK, $data, MAX_RECV_LEN, 0 ); if ( $from_who ) { my ( $the_port, $the_ip ) = sockaddr_in( $from_who ); my $remote_name = gethostbyaddr( $the_ip, AF_INET ); warn "Received from $remote_name: ", length( $data
暂无评论