|
-
Jan 9th, 2017, 06:31 PM
#1
Thread Starter
Addicted Member
Packet sniffing without subclassing
I want to preface this by saying I try not to bug you guys with tons of questions I can figure out on my own with some research, but I'm at my wits end on this one. I've been playing with one of the packet sniffer projects from PSC, but I noticed when there's a lot of network traffic, the subclassed event fires so fast it locks out the user, jacks up the CPU usage, etc. I've tried adding DoEvents in different areas and prevented it from updating the TreeView since it's a CPU hog, but I can't get it to behave much better. I've tried a number of other sniffers on PSC and elsewhere and they all seem to use the same subclassing method.
I did some reading about WSAIoctl() that's used for sniffing (without winpcap) and it mentions an overlap option (with a completion routine, etc), but I'm not sure how to implement it. I've searched for VB6 source code using this option, but can't find anything. I'm not even sure if that would solve the issue, but I would like to not be at the mercy of the callback if possible. And I like to not deal with subclassing when at all possible. Ideally I'd like to call a routine that checks a buffer or something to see if any new network events have come through and cycle through it.
Anyone know what a solution might be? Any help would be greatly appreciated. I've been studying this for days with no luck! :/
Here's the project I've been fiddling with:
http://www.planet-source-code.com/vb...46567&lngWId=1
Last edited by CrazyDude; Jan 9th, 2017 at 06:36 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|