Hi,

I have made this small program which is supposed to log incoming traffic on UDP port 4848 and 25300.

I have made two texboxes to log each ports traffic, and I have added 2 Winsock controls, both for UDP. I also have a button to retrieve the logged data.. althoug the best would be if it refreshed itself as it retrieved the data..

Heres my code:

VB Code:
  1. Private Sub Command1_Click()
  2.     Winsock1.GetData strData
  3.     Text1.Text = strData
  4.     Winsock2.GetData strData
  5.     Text2.Text = strData
  6.     MsgBox "Data retrieved", vbOKOnly, "Info"
  7. End Sub
  8.  
  9. Private Sub Form_Load()
  10. Winsock1.LocalPort = 4848
  11. Winsock1.LocalPort = 25300
  12. Winsock2.LocalPort = 4848
  13. Winsock2.LocalPort = 25300
  14. Winsock1.RemotePort = 4848
  15. Winsock1.Bind 4848
  16. Winsock2.RemotePort = 25300
  17. Winsock2.Bind 25300
  18. Winsock1.RemoteHost = "127.0.0.1"
  19. Winsock2.RemoteHost = "127.0.0.1"
  20. End Sub
  21.  
  22. Private Sub Winsock1_DataArrival _
  23. (ByVal bytesTotal As Long)
  24.     Dim strData As String
  25.     Winsock1.GetData strData
  26.     Text1.Text = strData
  27. End Sub
  28.  
  29. Private Sub Winsock2_DataArrival _
  30. (ByVal bytesTotal As Long)
  31.     Dim strData As String
  32.     Winsock2.GetData strData
  33.     Text2.Text = strData
  34. End Sub


The problem is this isnt working at all.. when I start it my firewall tells me something is trying to connect thru/to? it tho.. although it doesnt give me any output at all... all help here are greatly apprecciated!!!

Thanks.