具体情况:Client 的 Winsock 和 Server 的Winsock都进行了端口与地址连接
现在这2个winsock开始进行数据交换。Client和 Server是两个程序哦!client:
sub Command1_Click()
   winsock.senddata "Hello"
end subSub winsock_DataArrival(ByVal bytesTotal As Long)
Dim m_strBuffer as string
     winsock.getdata m_strBuffer
     if m_strBuffer<>"" then
        winsock.SendData "Microsoft"
        m_strBuffer=""
     end if
End SubServer:
Sub winsock_DataArrival(ByVal bytesTotal As Long)
Dim m_strBuffer as string
     winsock.getdata m_strBuffer
     if m_strBuffer="Microsoft" or m_strBuffer="Hello" then
        winsock.SendData "abc"
        m_strBuffer=""
     end if
End Sub 让他们一直发送和接受看出不出错。