TCPObjs are supposed to stay connected, right? For some reason every-time i use send();, it disconnects after the file is sent.
if(!isObject(TCP))
{
new TCPObject(TCP)
{
site = "http://forum.blockland.us";
port = 80;
};
}
function tcp2()
{
TCP.connect("forum.blockland.us:80");
}
function TCP::onConnected(%this)
{
$file="/index.php?;wap2";
$url="forum.blockland.us:80";
%this.send("GET "@$file@" HTTP/1.0\nHost: " @$url@"\nUser-Agent: Torque\n\r\n\r\n");
echo("CONNECT");
}
function TCP::onDisconnect(%this)
{
echo("DISCONNECTED");
}
function TCP::onLine(%this,%line)
{
echo(%line);
}