From WikiChip
Difference between revisions of "mirc/commands/sockudp"
m |
|||
Line 1: | Line 1: | ||
− | The '''/sockudp command''' allows you to send data to a specific address at a specific port destination | + | The '''/sockudp command''' allows you to send data to a specific address at a specific port destination (See [[UDP Sockets - mIRC|UDP sockets]]). |
− | '''Note''': if /sockudp fails, it sets $sock().wserr to the error value, and trigger on sockwrite with $sockerr set etc. | + | '''Note''': if /sockudp fails, it sets [[$sock identifier - mIRC|$sock().wserr]] to the error value, and trigger on sockwrite with [[$sockerr identifier - mIRC|$sockerr]] set etc. |
== Synopsis == | == Synopsis == | ||
Line 8: | Line 8: | ||
== Switches == | == Switches == | ||
* '''-b''' - Indicates that you are specifying the numbytes value which is the number of bytes you want send, the full line is sent otherwise | * '''-b''' - Indicates that you are specifying the numbytes value which is the number of bytes you want send, the full line is sent otherwise | ||
− | * '''-n''' - Appens a $crlf to the line being sent if it's not a &binvar or if does not already end with a $crlf | + | * '''-n''' - Appens a [[$crlf identifier - mIRC|$crlf]] to the line being sent if it's not a &binvar or if does not already end with a $crlf |
* '''-t''' - Forces mIRC to send anything beginning with a & as plain text | * '''-t''' - Forces mIRC to send anything beginning with a & as plain text | ||
* '''-k''' - Keeps the socket opened | * '''-k''' - Keeps the socket opened |
Revision as of 19:15, 3 July 2014
The /sockudp command allows you to send data to a specific address at a specific port destination (See UDP sockets).
Note: if /sockudp fails, it sets $sock().wserr to the error value, and trigger on sockwrite with $sockerr set etc.
Synopsis
/sockudp -bntkd [bindip] <name> [port] <ipaddress> <port> [numbytes] [text|%var|&binvar]
Switches
- -b - Indicates that you are specifying the numbytes value which is the number of bytes you want send, the full line is sent otherwise
- -n - Appens a $crlf to the line being sent if it's not a &binvar or if does not already end with a $crlf
- -t - Forces mIRC to send anything beginning with a & as plain text
- -k - Keeps the socket opened
- -d - Means you have specified the ip address as the bind address
Parameters
- [bindip] - If -d has been specified, the ip address you want to use as the bind address.
- <name> - The sockname name.
- [port] - If specified, the local port to use, otherwise mIRC choose one randomly.
- <ipaddress> - The ip address you want to send to information to, use you localhost 127.0.0.1 with -k to create a listening socket.
- <port> - The port you want to send to information to, that's your listening port if you create a server.
- [numbytes] - If -b has been specified, indicates the number of bytes you want to send.
Example
Compatibility
Added: mIRC v5.5
Added On: 08/01/99
Note: Individual switches were not taken into consideration.