46 lines (34 with data), 756 Bytes
//
// Network Related Modules Stuff.
// Also: see Socket Module
//
int handle;
reset()
{
int x;
handle = load_shared_object("modules/network.so");
}
query_destruct()
{
unload_shared_object(handle);
}
// Returns the current machine hostname
string query_host_name()
{
return ext_c_call(handle, "lpc_query_host_name");
}
// Relay daemon support - mess with the apparent IP num
// of the connection
int set_ip_number(object obj, string ip)
{
return ext_c_call(handle, "lpc_set_ip_number", obj, ip);
}
string query_ip_number(object o)
{
return ext_c_call(handle, "lpc_query_ip_number", o);
}
// Mess with the (live) objects output echo state
int toggle_echo(object o)
{
return ext_c_call(handle, "lpc_toggle_echo", o);
}