From WikiChip
Difference between revisions of "mirc/commands/sockudp"
(Created page with "The '''/sockudp command''' allows you to send data to a specific address at a specific port destination. '''Note''': if /sockudp fails, it sets $sock().wserr to the error val...") |
|||
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. Check out the UDP article [[UDP Sockets - mIRC|here]] |
'''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().wserr to the error value, and trigger on sockwrite with $sockerr set etc. |
Revision as of 19:40, 2 July 2014
The /sockudp command allows you to send data to a specific address at a specific port destination. Check out the UDP article here
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.