2012-07-27 21:22:05 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
// scripts/modScripts/server/serverNetworking.cs
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
if (!IsObject(ServerNetwork))
|
|
|
|
|
new TCPObject(ServerNetwork);
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::onConnect(%this)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::onConnectFailed(%this)
|
|
|
|
|
{
|
2012-07-28 14:56:45 +00:00
|
|
|
if (%this.testingServer)
|
|
|
|
|
{
|
|
|
|
|
error("Error: Unable to verify connection to server "@%this.testIP@" at port "@%this.testPort@"!");
|
|
|
|
|
%this.testIP = "";
|
|
|
|
|
%this.testPort = "";
|
|
|
|
|
%this.testingServer = false;
|
|
|
|
|
}
|
2012-07-27 21:22:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::onDisconnect(%this)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::onDisconnectFailed(%this)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::listen(%this)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::send(%this)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::onLine(%this, %line)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ServerNetwork::testServerIP(%this, %IP, %port)
|
|
|
|
|
{
|
2012-07-28 14:56:45 +00:00
|
|
|
%this.testingServer = true;
|
|
|
|
|
%this.testIP = %ip;
|
|
|
|
|
%this.testPort = %port;
|
|
|
|
|
%this.connect(%ip @ ":" @ %port);
|
2012-07-27 21:22:05 +00:00
|
|
|
}
|