nframe is a tech demo of a Server-Client network framework.
Basis:
- Server is constantly running and can accept n connections
- Clients connect individually to the Server only when necessary, not keeping a connection open
- Persistent data can be stored on disk in JSON files
- A simple pid based file lock prevents modification of JSON data while server is running
usage: nframe_server.py [-h] [-i IP] [-p PORT] [--import IMPORT_FILE]
[--export EXPORT_FILE] [--force-unlock]
nframe server
-h, --help show this help message and exit
-i IP, --ip IP IP address of server
-p PORT, --port PORT Port of server
--import IMPORT_FILE Import data before starting server
--export EXPORT_FILE Export data then exits
--force-unlock Remove lock file without discretion
> from nframe_client import Client
> conn = Client()
> conn.message("test data")
# test data
Developed for:
- Python 2.6+
- Python 3.2+
Copyright (c) 2014 Chris Griffith - MIT License (see LICENSE)