| 
 | 
 
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.   
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2002 
Posts: 294  
Pan-dimensional mouse 
 | 
 
 
Pan-dimensional mouse 
Joined:  Dec 2002 
Posts: 294  | 
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: 120  
Vogon poet 
 | 
 
 
Vogon poet 
Joined:  Dec 2002 
Posts: 120  | 
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,033  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2006 
Posts: 4,033  | 
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: 294  
Pan-dimensional mouse 
 | 
 
 
Pan-dimensional mouse 
Joined:  Dec 2002 
Posts: 294  | 
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,033  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2006 
Posts: 4,033  | 
 
  
#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
 
 
 
  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Oct 2004 
Posts: 8,061  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Oct 2004 
Posts: 8,061  | 
You didn't mention if you have upnp enabled.  That is most likely the cause. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2002 
Posts: 3,863  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Dec 2002 
Posts: 3,863  | 
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 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Feb 2003 
Posts: 306  
Fjord artisan 
 | 
 
 
Fjord artisan 
Joined:  Feb 2003 
Posts: 306  | 
version 6.35 has no upnp support, that is why we were talking about it. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2002 
Posts: 3,863  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Dec 2002 
Posts: 3,863  | 
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,  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2002 
Posts: 2,884  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Dec 2002 
Posts: 2,884  | 
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. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
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.
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2002 
Posts: 120  
Vogon poet 
 | 
 
 
Vogon poet 
Joined:  Dec 2002 
Posts: 120  | 
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: 101  
Vogon poet 
 | 
 
 
Vogon poet 
Joined:  Mar 2008 
Posts: 101  | 
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  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Mar 2008 
Posts: 101  
Vogon poet 
 | 
 
 
Vogon poet 
Joined:  Mar 2008 
Posts: 101  | 
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.  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
5618
 
 | 
 
| 
 5618 
 | 
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...  
 
 |  
 
 | 
 
 
 |  
 
 
   |  
 
 |