• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

Winsock and Windows XP

I'm using winsock to scan a subnet for NCTs, using vb6.  It works flawlessly on a windows 2000 PC, but not so good with XP.  With XP, when the program tries to connect to an IP that doesn't exist, it's almost like it keeps trying to connect, even though I closed that winsock and unloaded it.  I can do a netstat -n and see those IPs still there.  This causes my program to quit working all together until XP quits trying to connect to those IPs.  I guess there is a limit to how many simultaneous connections you can make with winsock?  

I've tried just using a single winsock control and scanning one IP at a time, and I've tried it with a winsock array with no luck.  The only way it works is when I put a big pause in between every IP...but it's still inconsistent.  

Is there any other way to stop trying to connect to an IP other than "winsock(x).close"??

0
xviiivx
Asked:
xviiivx
  • 2
1 Solution
 
zzzzzoocCommented:
SP2? A new security feature was introduced in that that limits half-opened outgoing connections. SYN is sent to a server and it waits for an ACK so if you try to connect to a host that doesn't exist, "netstat" will list a lot of states of SYN_SENT (half-open) and you'll have to wait for them to time-out.

You may want to try pinging the hosts first.
0
 
xviiivxAuthor Commented:
I finally found a "fix".  There's a program called xp anti spy that has an option to increase the number of simultaneous connections.  I'm scanning over 100 IPs at a time, and it is working great.  
0
 
zzzzzoocCommented:
"XP Anti Spy" increases the connections which I mentioned was limited by SP2's new security feature. My original comment singled-out their problem to which they found a resolution for.

You can just PAQ & refund, though.
0
 
CetusMODCommented:
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now