Difference between revisions of "Socklisten"
From Scriptwiki
m |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
* Port is the TCP port you wish to listen for connections on. If you do not specify this, a port is chosen randomly from the list of DCC ports. For most services, you will want to specify this. | * Port is the TCP port you wish to listen for connections on. If you do not specify this, a port is chosen randomly from the list of DCC ports. For most services, you will want to specify this. | ||
− | == | + | ==Explanation== |
In order for a remote (or local) computer to connect to your computer over a TCP/IP connection, your computer must be '''listening''' on the port it tries to connect to. It also must accept, via [[Sockaccept]] in an [[On socklisten]] event, the connection. If you are not listening on the port, the remote computer will fail to connect. | In order for a remote (or local) computer to connect to your computer over a TCP/IP connection, your computer must be '''listening''' on the port it tries to connect to. It also must accept, via [[Sockaccept]] in an [[On socklisten]] event, the connection. If you are not listening on the port, the remote computer will fail to connect. | ||
Line 13: | Line 13: | ||
/socklisten MyWebServer 80 | /socklisten MyWebServer 80 | ||
/socklisten MyOwnIRCServer 6667 | /socklisten MyOwnIRCServer 6667 | ||
+ | |||
+ | [[Category:Socket]] | ||
+ | [[Category:Commands]] |
Latest revision as of 19:25, 30 January 2011
The socklisten command tells mIRC to begin listening for incoming connections from remote computers. This applies to TCP connections only. If you wish to use UDP, see Sockudp.
/socklisten [-d] [bindip] <name> [port]
- The -d switch indicates that a bind IP address was specified, if you use a bind ip you must use -d. Usually, you do not need to worry about either.
- The bindip is the IP address you wish this listen to be bound to. This is only relevant if you have access to multiple IP addresses. If you do not know what this is, simply do not use this. It must be used with -d.
- Name is the name of the socket listener. You must specify this for use with the On socklisten event.
- Port is the TCP port you wish to listen for connections on. If you do not specify this, a port is chosen randomly from the list of DCC ports. For most services, you will want to specify this.
Explanation
In order for a remote (or local) computer to connect to your computer over a TCP/IP connection, your computer must be listening on the port it tries to connect to. It also must accept, via Sockaccept in an On socklisten event, the connection. If you are not listening on the port, the remote computer will fail to connect.
Examples
/socklisten MyWebServer 80 /socklisten MyOwnIRCServer 6667