好吧,我有我的服务器连接请求的代码。
If sckClients(clientCounter).State <> adstateclosed Then sckClients(clientCounter).Close
sckClients(clientCounter).Accept requestID
Command1.Enabled = True
MsgBox "Connected to client."
Combo1.AddItem sckClients(clientCounter).LocalIP & "(" & clientCounter & ")"
clientCounter = clientCounter + 1
Load sckClients(clientCounter)
这是为了更新客户列表。
StrMsg = "1~Server~"
For x = 0 To Combo1.ListCount - 1
If x = Combo1.ListCount - 1 Then
StrMsg = StrMsg & Combo1.List(x)
Else
StrMsg = StrMsg & Combo1.List(x) & "~"
End If
Next x
For x = 0 To clientCounter - 1
sckClients(x).SendData StrMsg
Next x
我的问题是,如何将其发送到每个客户的组合框客户列表?