Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 1 | SYNOPSIS |
| 2 | int send_udp(string host, int port, bytes message) |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 3 | int send_udp(string host, int port, int * message) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 5 | DESCRIPTION |
| 6 | Sends the <message> in an UDP packet to the given host and port |
| 7 | number. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 8 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 9 | The efun causes the privilege violation ("send_udp"). |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 10 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 11 | Returns 1 on success, 0 on failure. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 12 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 13 | Note: On some machines a failed send_udp() will not be registered |
| 14 | until the next send_udp() - the latter one might return '0' even |
| 15 | if itself was successful. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 16 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 17 | BUGS |
| 18 | If the <host> is given as a fully qualified name (instead of |
| 19 | an IP address), the execution will block until the name is resolved. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 20 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 21 | HISTORY |
| 22 | LDMud 3.2.9 renamed this efun from send_imp(), and also changed the |
| 23 | privilege violation string and the apply names. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 24 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 25 | SEE ALSO |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 26 | query_udp_port(E), receive_udp(M) |