程序的代码以及说明如下:
‘本程序在VB6.0+Windows2000下测试通过!
DimtmpstrAsString
DimNOW_OUTAsInteger'总共出去连接的有几个Winsock
PrivateSubCommand1_Click()
ListPorts.AddItemtxtADDPORT.Text
EndSub
PrivateSubCommand2_Click()
OnErrorResumeNext
IfCommand2.Caption="监听"Then
Fori=0ToListPorts.ListCount-1
LoadWinsock1(i 1)'加载监听端口的winsock1数组控件
Winsock1(i 1).LocalPort=ListPorts.List(i)'设定端口
Winsock1(i 1).Listen&...[ 查看全文 ]