Sockets!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been using sockets to try and connect to ranges of IP's on port 23. I'm
trying to create a network discovery program for a specific program listening
on port 23. I have no problem setting up the socket and making the
connection, my problem happens when I try and make a connection to an IP with
no machine. It takes a little longer then I would like it to before it
throws an exception. I've noticed that during this period all its doing is
sending out ARP requests for the IP, is there a way to shorten the time it
does its ARP search for non-existent machines?

Thanks,

Matt
 
I cannot speak to reducing the number of arp attempts, however I have run
into a similar issue in past when trying reduce the amount of time spent
trying to connect to PC’s that aren’t there.

My solution was to use async events by firing off BeginConnect() and waiting
a short time to see if the connect succeeded, if it did, I called it good, if
not, I would end the async event and move onto the next.

Brendan
 
How did you set a timer on trying to connect? Could you post some example
code?

Thanks,

Matt
 
Back
Top