server_comm.inc
Original include source with line numbers.
| 1 | #if defined _server_comm_included |
| 2 | #endinput |
| 3 | #endif |
| 4 | |
| 5 | #define _server_comm_included |
| 6 | |
| 7 | #if AMXX_VERSION_NUM >= 175 |
| 8 | #pragma reqlib server_comm |
| 9 | #if !defined AMXMODX_NOAUTOLOAD |
| 10 | #pragma loadlib server_comm |
| 11 | #endif |
| 12 | #else |
| 13 | #pragma library server_comm |
| 14 | #endif |
| 15 | |
| 16 | /* |
| 17 | * Called when the server receives data from another server |
| 18 | * |
| 19 | * @param data - The string containing data |
| 20 | * @param len - The length of the data |
| 21 | * |
| 22 | * @return Return value is ignored |
| 23 | * |
| 24 | */ |
| 25 | forward scomm_receive(data[], len); |
| 26 | |
| 27 | /* |
| 28 | * Sends data to a given IP |
| 29 | * |
| 30 | * @param ip - The IP to send data to |
| 31 | * @param data - The data to send |
| 32 | * |
| 33 | * @note The port must be at the end of the IP address |
| 34 | * @note To send data back to the same server, use "loopback" as the IP and no port at the end of it |
| 35 | * |
| 36 | * @return Returns 1 on success, 0 on failure |
| 37 | * |
| 38 | */ |
| 39 | native scomm_send(const ip[], const data[]); |
| 40 | |
| 41 | /* |
| 42 | * Sends formatted data to a given IP |
| 43 | * |
| 44 | * @param ip - The IP to send data to |
| 45 | * @param format - The format of the data |
| 46 | * |
| 47 | * @note The port must be at the end of the IP address |
| 48 | * @note To send data back to the same server, use "loopback" as the IP and no port at the end of it |
| 49 | * |
| 50 | * @return Returns 1 on success, 0 on failure |
| 51 | * |
| 52 | */ |
| 53 | native scomm_sendf(const ip[], const format[], any:...); |
| 54 | /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE |
| 55 | *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } |
| 56 | */ |
| 57 | |