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:
Private Sub Command1_Click() Winsock1.GetData strData Text1.Text = strData Winsock2.GetData strData Text2.Text = strData MsgBox "Data retrieved", vbOKOnly, "Info" End Sub Private Sub Form_Load() Winsock1.LocalPort = 4848 Winsock1.LocalPort = 25300 Winsock2.LocalPort = 4848 Winsock2.LocalPort = 25300 Winsock1.RemotePort = 4848 Winsock1.Bind 4848 Winsock2.RemotePort = 25300 Winsock2.Bind 25300 Winsock1.RemoteHost = "127.0.0.1" Winsock2.RemoteHost = "127.0.0.1" End Sub Private Sub Winsock1_DataArrival _ (ByVal bytesTotal As Long) Dim strData As String Winsock1.GetData strData Text1.Text = strData End Sub Private Sub Winsock2_DataArrival _ (ByVal bytesTotal As Long) Dim strData As String Winsock2.GetData strData Text2.Text = strData 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.




Reply With Quote