|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
OP
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Hi all, I have just noticed that my sockets are taking ages to open. I then realised it is only since I downloaded the new version. I have used this code on mIRC 6.35 and on mIRC 7.1 and got two vastly different results. alias test_socket {
set -e %socket_time $ticks
sockopen test_socket www.google.com 80
}
on *:sockopen:test_socket:{
echo $color(info) -a It took $calc(($ticks - %socket_time) / 1000) seconds for $sockname to open.
unset %socket_time
sockclose $sockname
} mIRC 7.1 returned It took 15.031 seconds for test_socket to open.mIRC 6.35 returned It took 0.078 seconds for test_socket to open.I find it very troubling, and wonder what the problem could be.
Newbie
|
|
|
|
Joined: Dec 2002
Posts: 344
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Dec 2002
Posts: 344 |
Can you identify whether the connection is successful or not? What error (if any) is reported if you use this code? alias test_socket {
set -e %socket_time $ticks
sockopen test_socket www.google.com 80
}
on *:sockopen:test_socket:{
echo -a Time: $calc(($ticks - %socket_time) / 1000) seconds
unset %socket_time
if ($sockerr > 0) {
echo -a Connection failed: $sockerr / $sock($sockname).wsmsg
return
}
echo -a Connection successful
sockclose $sockname
}
|
|
|
|
Joined: Dec 2002
Posts: 122
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 122 |
Can't reproduce it here. 7.1 is slower, but not noticable.
Do you have the UPnP settings enabled?
mIRC 7.1: It took 0.063 seconds for test_socket to open. It took 0.062 seconds for test_socket to open. It took 0.078 seconds for test_socket to open. It took 0.062 seconds for test_socket to open. It took 0.062 seconds for test_socket to open. It took 0.063 seconds for test_socket to open. It took 0.078 seconds for test_socket to open. It took 0.062 seconds for test_socket to open. It took 0.078 seconds for test_socket to open. It took 0.062 seconds for test_socket to open. It took 0.078 seconds for test_socket to open. It took 0.062 seconds for test_socket to open. It took 0.078 seconds for test_socket to open. It took 0.062 seconds for test_socket to open.
mIRC 6.35: It took 0.032 seconds for test_socket to open. It took 0.047 seconds for test_socket to open. It took 0.046 seconds for test_socket to open. It took 0.032 seconds for test_socket to open. It took 0.046 seconds for test_socket to open. It took 0.047 seconds for test_socket to open. It took 0.031 seconds for test_socket to open. It took 0.031 seconds for test_socket to open. It took 0.047 seconds for test_socket to open. It took 0.031 seconds for test_socket to open. It took 0.031 seconds for test_socket to open. It took 0.031 seconds for test_socket to open.
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
Can't reproduce this either with OP code, it makes sense to me that the connexion is successful since it get a result
Last edited by Wims; 23/08/10 07:54 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Dec 2002
Posts: 344
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Dec 2002
Posts: 344 |
Can't reproduce this either with OP code, it makes sense to me that the connexion is successful since it get a result The ON SOCKOPEN event will be triggered even if the connection fails. You must check $sockerr to find out.
|
|
|
|
Joined: Jul 2006
Posts: 4,186
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,186 |
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
OP
Fjord artisan
Joined: Jul 2006
Posts: 242 |
I can confirm that the socket does open successfully.
mIRC 7.1 Returns
Time: 15.047 seconds Connection successful
mIRC 6.35 Returns
Time: 0.031 seconds Connection successful
Newbie
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You didn't mention if you have upnp enabled. That is most likely the cause.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 5,491
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,491 |
I have not been able to reproduce this so far. The connection is immediate in my tests. Which version of Windows are you using?
UPnP is unlikely to be the cause of any issues since UPnP is only used when mIRC needs to listen for an incoming connection not when opening an outgoing connection. However you can try disabling UPnP in the Options/Connect/Options/Ports dialog to see if that helps.
Also in the Ports dialog, if you disable the Port Range options, does that help?
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
OP
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Hi, Sorry for taking so long to reply. I am using Windows XP Pro I went to options/ports in 7.1 and could not find how to disable the range. I have enclosed a screenshot below, unless you want me to clear both boxes? not sure what you meant. Also disabling uPNP had no effect! Even if it is upnp why is mIRC6.35 not affected? Many thanks. http://img412.imageshack.us/img412/5692/mircscreenshot.jpg
Newbie
|
|
|
|
Joined: Feb 2003
Posts: 307
Fjord artisan
|
Fjord artisan
Joined: Feb 2003
Posts: 307 |
version 6.35 has no upnp support, that is why we were talking about it.
|
|
|
|
Joined: Dec 2002
Posts: 5,491
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,491 |
Yes, if you could uncheck all boxes in the "Port Range" section and then let us know if that helps.
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
OP
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Hi there,
Just did that and still get the same problem.
Time: 15.063 seconds Connection successful
Regards,
Newbie
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Have you tried disabling any anti-virus or firewall software that may be hampering mIRC in the name of security?
It could be you've added mIRC 6.35 to a whitelist previously.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
OP
Fjord artisan
Joined: Jul 2006
Posts: 242 |
Hi starbucks,
I disabled windows firewall, and my AV, still the same result. I did the same with my routers firewall etc.
Take in mind mIRC 6.35 opens sockets instantly.
If it helps to debug I am happy for you to connect to my machine.
-
Time: 15.047 seconds Connection successful
Its always seems to be round the 15 second mark for some reason.
Last edited by HaleyJ; 24/08/10 08:35 PM.
Newbie
|
|
|
|
Joined: Dec 2002
Posts: 122
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 122 |
Maybe it's an option to use a network analyzer like Wireshark, to see what the difference in behaviour is between 6.35 & 7.1.
|
|
|
|
Joined: Mar 2008
Posts: 93
Babel fish
|
Babel fish
Joined: Mar 2008
Posts: 93 |
I also noticed this with my HTTP-Check script (checks an URL and tells me the title, or whether it redirects to a potentially dangerous site).
6.35 was pretty quick, 7.1 takes considerably longer. I also noticed this with /dns queries, so I think it might be related to that (remember that IPv6 is now available from within mIRC).
UPnP is disabled, all ports in the configuration are unchecked, and I don't have a firewall that could affect this.
|
|
|
|
Joined: Jul 2006
Posts: 242
Fjord artisan
|
OP
Fjord artisan
Joined: Jul 2006
Posts: 242 |
I also noticed this with my HTTP-Check script (checks an URL and tells me the title, or whether it redirects to a potentially dangerous site).
6.35 was pretty quick, 7.1 takes considerably longer. I also noticed this with /dns queries, so I think it might be related to that (remember that IPv6 is now available from within mIRC).
UPnP is disabled, all ports in the configuration are unchecked, and I don't have a firewall that could affect this. Could you tell us the result when you execute the following code, both in 6.35 and in 7.1 alias test_socket {
set -e %socket_time $ticks
sockopen test_socket www.google.com 80
}
on *:sockopen:test_socket:{
echo -a Time: $calc(($ticks - %socket_time) / 1000) seconds
unset %socket_time
if ($sockerr > 0) {
echo -a Connection failed: $sockerr / $sock($sockname).wsmsg
return
}
echo -a Connection successful
sockclose $sockname
} Usage /test_socket
Newbie
|
|
|
|
Joined: Mar 2008
Posts: 93
Babel fish
|
Babel fish
Joined: Mar 2008
Posts: 93 |
Time: 0.172 seconds
Connection successful I did some testing with /dns using the same piece of code (except /dns instead of /sockopen, and on DNS instead of on SOCKOPEN). The first request for a domain takes 10+ seconds, the following ones are quick (cached?) I guess its the same thing when doing /sockopen domain.tld instead, since someone needs to resolve the IP first.
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
I guess its the same thing when doing /sockopen domain.tld instead, since someone needs to resolve the IP first. Which obviously means his tests should be as fast as in 6.35 when he uses one of the IPs of www.google.comWe'll see...
|
|
|
|
|