有人会吗?
客户端.1给Winsock1.RemoteHost = 端口
2winsock1.RemoteHostIP ="192.168.1.1"
3Winsock1.Connect
服务端1.Winsock1.RemoteHost = 服务端口
2.Winsock1.Bind
3.Winsock1.Listen
4.就是有连接时处理.Private Sub Sockser_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Sockser(i).Accept requestID /*用一个winsock数组来对接
共有
Private Sub Sockser_DataArrival(Index As Integer, ByVal bytesTotal As Long)
dim var as XXX
winsock1.getdata var
信息到时处理.
winsock1.sendata
发信息.