-
Help Winsock Filter
hI ive made a proxy and i wanted to make a filter how do I it?
Code:
Public Sub Winsock1_DataArrival()
Dim Data As Object
Dim rByte As Byte
Winsock1.GetData(Data)
If Data = ?? Then 'Filter Here
Msgbox(??.ToString)
End If
End Sub
the code above doesnt work I need some help..
-
Re: Help Winsock Filter
What are you trying to filter...?
And why are you declaring Data as an object?
Code:
Private Sub Winsock1_DataArrival()
Dim bytData() As Byte, strData As String
winsock1.GetData bytData()
'Convert data to string.
strData = StrConv(bytData(), vbUnicode)
If LCase$(Left$(strData, 4)) = "post" Then
'Ignore HTTP post...
End If
End Sub
-
Re: Help Winsock Filter
this is written in VB.NEt..need .Net code
-
Re: Help Winsock Filter
the Winsock Control does not exist in vb.NET, you have to use the TCPClient and TCPListener calsses :(:(