# client
# http://perldoc.perl.org/perlipc.html#Sockets%3a-Client%2fServer-Communication

use Socket;

$proto = getprotobyname('tcp');
socket(SOCK, PF_INET, SOCK_STREAM, $proto);

$port = '3306';
$remote = '192.168.123.123';
$iaddr = inet_aton($remote);

$paddr = sockaddr_in($port,$iaddr);
connect(SOCK,$paddr);

@lines = <SOCK>;
print @lines,"\n";
close(SOCK);


# ===================================
# server
# continue...
創作者介紹

創造心理的感動

gisanfu 發表在 痞客邦 PIXNET 留言(0) 人氣()