telnet.lua
资源名称:vlc-1.0.5.zip [点击查看]
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:8k
源码类别:
midi
开发平台:
Unix_Linux
- --[==========================================================================[
- telnet.lua: VLM interface plugin
- --[==========================================================================[
- Copyright (C) 2007 the VideoLAN team
- $Id$
- Authors: Antoine Cellerier <dionoea at videolan dot org>
- 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- --]==========================================================================]
- description=
- [============================================================================[
- VLM Interface plugin
- Copy (features wise) of the original VLC modules/control/telnet.c module.
- Differences are:
- * it's in Lua
- * 'lock' command to lock the telnet promt
- * possibility to listen on different hosts including stdin
- for example:
- listen on stdin: vlc -I lua --lua-intf telnet --lua-config "telnet={host='*console'}"
- listen on stdin + 2 ports on localhost: vlc -I lua --lua-intf telnet --lua-config "telnet={hosts={'localhost:4212','localhost:5678','*console'}}"
- Configuration options setable throught the --lua-config option are:
- * hosts: A list of hosts to listen on (see examples above).
- * host: A host to listen on. (won't be used if `hosts' is set)
- * password: The password used for remote clients.
- * prompt: The prompt.
- ]============================================================================]
- require "host"
- --[[ Some telnet command special characters ]]
- WILL = "251" -- Indicates the desire to begin performing, or confirmation that you are now performing, the indicated option.
- WONT = "252" -- Indicates the refusal to perform, or continue performing, the indicated option.
- DO = "253" -- Indicates the request that the other party perform, or confirmation that you are expecting the other party to perform, the indicated option.
- DONT = "254" -- Indicates the demand that the other party stop performing, or confirmation that you are no longer expecting the other party to perform, the indicated option.
- IAC = "255" -- Interpret as command
- ECHO = "