| |
- Devnull
- Options
- asynchat.async_chat(asyncore.dispatcher)
-
- VMSPChannel
- asyncore.dispatcher
-
- VMSPServer
-
- DebugServer
class DebugServer(VMSPServer) |
|
basic server for testing, does nothing |
|
- __getattr__(self, attr) from asyncore.dispatcher
- __init__(self, localaddr) from VMSPServer
- __repr__(self) from asyncore.dispatcher
- accept(self) from asyncore.dispatcher
- add_channel(self, map=None) from asyncore.dispatcher
- bind(self, addr) from asyncore.dispatcher
- close(self) from asyncore.dispatcher
- connect(self, address) from asyncore.dispatcher
- create_socket(self, family, type) from asyncore.dispatcher
- del_channel(self, map=None) from asyncore.dispatcher
- handle_accept(self) from VMSPServer
- handle_close(self) from asyncore.dispatcher
- handle_connect(self) from asyncore.dispatcher
- handle_error(self) from asyncore.dispatcher
- handle_expt(self) from asyncore.dispatcher
- handle_expt_event(self) from asyncore.dispatcher
- handle_read(self) from asyncore.dispatcher
- handle_read_event(self) from asyncore.dispatcher
- handle_write(self) from asyncore.dispatcher
- handle_write_event(self) from asyncore.dispatcher
- listen(self, num) from asyncore.dispatcher
- log(self, message) from asyncore.dispatcher
- log_info(self, message, type='info') from asyncore.dispatcher
- process_message(self, peer, data)
- readable(self) from asyncore.dispatcher
- recv(self, buffer_size) from asyncore.dispatcher
- send(self, data) from asyncore.dispatcher
- set_reuse_addr(self) from asyncore.dispatcher
- set_socket(self, sock, map=None) from asyncore.dispatcher
- writable(self) from asyncore.dispatcher
|
class VMSPChannel(asynchat.async_chat) |
|
Channel class, where the work is actually done.
This class is called by the main server.
PARAMETERS:
- server: server class
- conn: remote port
- addr: remote address
- locaddr: local address (used for authentication)
Has the standard states of COMMAND, DATA and AUTH: READY is
implied.
The data file is initialised from vmspdata and its class
methods are also instansiated. |
|
- __getattr__(self, attr) from asyncore.dispatcher
- __init__(self, server, conn, addr, locaddr, uptime)
- __repr__(self) from asyncore.dispatcher
- accept(self) from asyncore.dispatcher
- add_channel(self, map=None) from asyncore.dispatcher
- bind(self, addr) from asyncore.dispatcher
- close(self) from asyncore.dispatcher
- close_when_done(self) from asynchat.async_chat
- collect_incoming_data(self, data)
- implement base class method
- connect(self, address) from asyncore.dispatcher
- create_socket(self, family, type) from asyncore.dispatcher
- decoderesp(self, clientstr)
- Test the client's response to an AUTH challenge
- del_channel(self, map=None) from asyncore.dispatcher
- discard_buffers(self) from asynchat.async_chat
- found_terminator(self)
- implement base class method
- get_terminator(self) from asynchat.async_chat
- handle_accept(self) from asyncore.dispatcher
- handle_close(self) from asynchat.async_chat
- handle_connect(self) from asyncore.dispatcher
- handle_error(self) from asyncore.dispatcher
- handle_expt(self) from asyncore.dispatcher
- handle_expt_event(self) from asyncore.dispatcher
- handle_read(self) from asynchat.async_chat
- handle_read_event(self) from asyncore.dispatcher
- handle_write(self) from asynchat.async_chat
- handle_write_event(self) from asyncore.dispatcher
- initiate_send(self) from asynchat.async_chat
- listen(self, num) from asyncore.dispatcher
- log(self, message) from asyncore.dispatcher
- log_info(self, message, type='Info', logfile=None)
- override base class method for file logging
- makechallenge(self)
- generate a challenge string.
This is a timestamp, consisting of current GMT time
and a random 6-bit hex string.
- old_HELP(self, arg)
- single-command help. ignores arguments.
Response codes:
504 no such topic
214 successful help topic
- push(self, msg)
- override base class for convenience
- push_with_producer(self, producer) from asynchat.async_chat
- readable(self) from asynchat.async_chat
- recv(self, buffer_size) from asyncore.dispatcher
- refill_buffer(self) from asynchat.async_chat
- rstring(self)
- Make a random hex string for timestamping.
We use /dev/urandom, it's much much faster. Tack on an
extra random bit if necessary to make a 6-bit string.
- send(self, data) from asyncore.dispatcher
- serv_log(self, message, logfile, type='notice')
- write entries to the server log
- set_reuse_addr(self) from asyncore.dispatcher
- set_socket(self, sock, map=None) from asyncore.dispatcher
- set_terminator(self, term) from asynchat.async_chat
- vmsp_AUTH(self, arg)
- VMSP AUTH:
Only accepts CRAM-MD5 authentication. Checks syntax,
issues the challenge, and enters the AUTH state.
If an already successful AUTH has been made, no further
AUTH's are accepted.
Response codes:
501 bad syntax
503 already done authentication.
504 not yet introduced.
505 bad auth type
334 begin challenge
- vmsp_EHLO(self, arg)
- VMSP EHLO:
adds extended VMSP commands and a list of them,
with identd lookup.
Response codes:
501 bad syntax
503 already introduced
250 successful introduction
- vmsp_GET(self, arg)
- VMSP GET:
Gets item if possible, and logs result.
Response codes:
501 bad syntax
256 success
421 out of item
423 no such item.
- vmsp_HELO(self, arg)
- VMSP HELO:
Implements very basic identd lookup for reply.
Response codes:
501 bad syntax
503 already introduced
250 successful introduction
- vmsp_HELP(self, arg)
- General help menu.
All commands are gathered from vmsp_HELPER, except for
single command help, which is from old_HELP.
Response codes:
214 successful help list
- vmsp_HELPER(self, arg)
- Prints help message based on helpstuff_* data elements.
- vmsp_LIST(self, arg)
- VMSP LIST:
Returns server list data depending on access level.
Response codes:
501 bad syntax
504 not yet introduced.
252 successful admin list
254 successful client list
- vmsp_NOOP(self, arg)
- standard NOOP
Rssponse codes:
501 bad syntax
250 successful noop
- vmsp_QUIT(self, arg)
- standard QUIT
Response codes:
221 quit acknowlegement
- writable(self) from asynchat.async_chat
|
class VMSPServer(asyncore.dispatcher) |
|
VMSP server class, uses VMSPChannel class |
|
- __getattr__(self, attr) from asyncore.dispatcher
- __init__(self, localaddr)
- __repr__(self) from asyncore.dispatcher
- accept(self) from asyncore.dispatcher
- add_channel(self, map=None) from asyncore.dispatcher
- bind(self, addr) from asyncore.dispatcher
- close(self) from asyncore.dispatcher
- connect(self, address) from asyncore.dispatcher
- create_socket(self, family, type) from asyncore.dispatcher
- del_channel(self, map=None) from asyncore.dispatcher
- handle_accept(self)
- handle_close(self) from asyncore.dispatcher
- handle_connect(self) from asyncore.dispatcher
- handle_error(self) from asyncore.dispatcher
- handle_expt(self) from asyncore.dispatcher
- handle_expt_event(self) from asyncore.dispatcher
- handle_read(self) from asyncore.dispatcher
- handle_read_event(self) from asyncore.dispatcher
- handle_write(self) from asyncore.dispatcher
- handle_write_event(self) from asyncore.dispatcher
- listen(self, num) from asyncore.dispatcher
- log(self, message) from asyncore.dispatcher
- log_info(self, message, type='info') from asyncore.dispatcher
- process_message(self, peer, data)
- Requiress a subclass to implement
- readable(self) from asyncore.dispatcher
- recv(self, buffer_size) from asyncore.dispatcher
- send(self, data) from asyncore.dispatcher
- set_reuse_addr(self) from asyncore.dispatcher
- set_socket(self, sock, map=None) from asyncore.dispatcher
- writable(self) from asyncore.dispatcher
| |