perl编写tcp socket通讯客户端代码

代码语言:perl

所属分类:文件

代码描述:perl编写tcp socket通讯客户端代码

代码标签: socket 通讯 客户端

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

#!/usr/bin/perl -w
# Filename : client.pl

use strict;
use Socket;

# initialize host and port
my $host = shift || 'localhost';
my $port = shift || 7890;
my $server = "localhost";  # Host IP running the server

# create the socket, connect to the port
socket(SOCKET,PF_INET,SOCK_STREAM,(getprotobyn.........完整代码请登录后点击上方下载按钮下载查看

网友评论0