Christian Damken
a4f497115a
- bugfix in class comm, header(): status codes couldn't be handled - added import for include/statuscodes.py, class statuscodes to include/__init__.py - added encode_message() and decode_message() to class comm - added use of encode_message() to motd() in class comm - added more docstrings and comments in class comm - added more comments in asrc-server.py - moved pid file check and creation around in asrc-server.py for less oddness when starting the server with -n
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
# include/statuscodes.py
|
|
#
|
|
# module version: 1.0.20130426
|
|
# for protocol versions 0.2.20130423 and later
|
|
#
|
|
|
|
|
|
class statuscodes:
|
|
description = dict(
|
|
# 000 - 400 server side
|
|
# 000 information
|
|
s001 = "OK",
|
|
s002 = "Version",
|
|
s003 = "MOTD",
|
|
# 100 authentication and maintenance
|
|
s101 = "Challenge",
|
|
s102 = "Success",
|
|
s103 = "Failure",
|
|
s104 = "To Many Tries",
|
|
# 200 command
|
|
s201 = "Valid",
|
|
s202 = "Valid Service Command",
|
|
s203 = "Invalid",
|
|
s204 = "Failure",
|
|
s205 = "Continue",
|
|
# 300 server
|
|
s301 = "Unhandled Exception",
|
|
s302 = "Shutting Down",
|
|
s303 = "Restarting",
|
|
s304 = "Encoding Error",
|
|
s305 = "SSL Error",
|
|
# 500 - 900 client side
|
|
# 500 information
|
|
s501 = "OK",
|
|
s502 = "Version",
|
|
# 600 authentication and maintenance
|
|
s601 = "Response",
|
|
s602 = "Failure",
|
|
# 700 command
|
|
s701 = "Reqiuest",
|
|
s702 = "Cancel",
|
|
# 800 client
|
|
s801 = "SSL Error"
|
|
)
|