菜鸟写的最简单的UDP程序出错,高手教教!!
程序如下:窗口frmpeera Private Sub Form_Load() With udppeera .RemoteHost = "peerb" .RemotePort = 1001 .Bind 1002 End With frmpeerb.Show End Sub
Private Sub txt_send_Change() udppeera.SendData txt_send.Text End Sub
Private Sub udppeera_DataArrival(ByVal bytesTotal As Long) Dim strdata As String udppeera.GetData strdata txt_output.Text = strdata End Sub 窗口frmpeerb Private Sub Form_Load() With udppeerb .RemoteHost = "peera" .RemotePort = 1002 .Bind 1001 End With End Sub
Private Sub txt_send_Change() udppeerb.SendData txt_send.Text End Sub
Private Sub udppeerb_DataArrival(ByVal bytesTotal As Long) Dim strdata As String udppeerb.GetData strdata txt_output.Text = strdata End Sub
出现错误 10014 无效参数