mIRC Home    About    Download    Register    News    Help

Print Thread
#151295 16/06/06 07:58 AM
Joined: Apr 2005
Posts: 7
D
damian Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2005
Posts: 7
Considering you can /socklisten to a specific IP/Address, shouldn't the $portfree() id check to see if the specific port is free on the specific IP?

$portfree(port [, address])

or something similar.

#151296 16/06/06 08:04 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
That doesnt make sence, $portfree returns if the port is free on your machine, there is no method or way for you to tell if another machine is using there port.

#151297 16/06/06 08:14 AM
Joined: Apr 2005
Posts: 7
D
damian Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2005
Posts: 7
hrm, maybe I wasn't clear, here's an example.
My computer has three IP's it's possible to listen from (127.0.0.1 [local traffic], 192.168.0.1 [network traffic], 202.173.183.98 [internet traffic]) and I *only* want to enable a socket to listen on the network, so I would bind using this method:

/socklisten -d 192.168.0.1 mysocket 1234

If you check the /socklist it'll come up as:

mysocket 192.168.0.1:1234 tcp listening

----
Alright, scrap what I've asked, mIRC doesn't support multi-ip listening properly anyway. haha
I was thinking that you could bind ANOTHER socket to another IP on the same port, but that's not possible with mIRC .. so there's no point in having the $portfree() do multiip. But just for the sake of explanation, I'll continue ...
---
If I were to bind another socket to another IP for Internet on the same port, I would (if it worked) do this:

/socklist -d 202.173.183.98 mysocket2 1234

Which would have come up with something like this in /socklist:

mysocket 192.168.0.1:1234 tcp listening
mysocket2 202.173.183.98:1234 tcp listening

If I wanted to check if I was still binding on 192.168.0.1 I would need to do something like $portfree(1234, 192.168.0.1), instead of just $portfree(1234) which would return $false due to the fact that 202.173.183.98 was still active.

Anywho, bai *runs away*


Link Copied to Clipboard