📄 connection.php
字号:
<?php/*** Netlands World Server is the coordinator of the VR in the Netlands Project* Copyright (C) 2002 Ricard Pillosu* * This program is free software; you can redistribute it and/or* modify it under the terms of the GNU General Public License* as published by the Free Software Foundation; either version 2* of the License, or (at your option) any later version.* * This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.* * You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*//* vim: set expandtab tabstop=4 shiftwidth=4 *//*** return code version** Maybe for require client updates* Input: <ping/>* Ouput: <ping time="1234567.12345"/>*/function command_version(){ global $config; $answer = array( "number" => $config['admin']['version']); return($answer);}/*** quit by client ... close the socket** may get some modifications in future* Input: <quit/>* Ouput: <quit msg="x/>** @param connection object*/function command_quit(&$connection){ close_socket($connection);}/*** ping <-> pong** so simple, return "pong" on every "ping"* Input: <ping/>* Ouput: <ping time="1234567.12345"/>*/function command_ping(){ list($usec, $sec) = explode(" ",microtime()); $total = ((float)$usec + (float)$sec); $answer = array( "time" => "$total"); return($answer);}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -