Hi, I'm using WinPcap to capture incoming data. Basically I'm dealing with a continuous stream of incoming data, either as byte array or as memorystream (pieces up to 64kb).
I need to check this data to see if there's a certain url and then extract it.
The url I need to find looks like this:
Code:
http://201.122.38.5/data/today/798572987-589571?139805890582
The length of the 'code' after "/today/" is always the same. The IP address changes.
What's the best/fastest/most efficient way to continuously check these byte arrays or memorystreams and extract the urls without hogging the CPU too much?
I'm using Framework 4.0.
vb.net Code:
Private Sub PacketHandler(ByVal packet As Packet)
packet.Ethernet.IpV4.Tcp.Payload.ToMemoryStream()
'// or
packet.Ethernet.IpV4.Tcp.Payload.ToArray()
End Sub