mIRC Homepage
Posted By: llyama $portfree problem, seems to be win98 only - 21/12/03 08:19 AM
if i create a TCP socket connection on port 8861 on my winxp box and do $portfree(8861) it returns $false

but doing the exact same on my win98 box, same script, it returns $true, even though the socket shows connected on that port using /socklist and netstat.

although when i create a listen socket on the port it then returns $false

using 6.12 mirc
ahem, i don't see where the problem is...

$portfree is supposed to return whetera port is free ($true) or not ($false). In the case you describe on WinXP, it works properly (ie: returns $false when the port is in use). Other than that, i think that the value returned by $portfree may depend on several factors which may explain why it returns $true on Win98 while it SHOULDN'T! blush
Posted By: llyama Re: $portfree problem, seems to be win98 only - 22/12/03 04:43 AM
yes i know it works correctly on windows xp, but on 98 it seems to return incorrect results and i can't see a pattern to it
A while ago I found I was getting problems with $portfree on Win98 as well - IIRC it was basically only recognising whether or not ports were used by mIRC or the usual Windows services, and not correctly recognising port usage by other applications.

I'd provide more details, but this was several versions ago, and in the end I found a workaround for what I wanted to do anyway... so it had slipped from my mind until I saw this thread. (Sorry! blush)

PM
© mIRC Discussion Forums