Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
/ nframe Public archive

Network Framework tech demo for Server-Client interation with persistant storage.

License

Notifications You must be signed in to change notification settings

cdgriffith/nframe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nframe

nframe is a tech demo of a Server-Client network framework. Build Status

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

Server

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

Client

> from nframe_client import Client

> conn = Client()

> conn.message("test data")
# test data

General Info

Developed for:

  • Python 2.6+
  • Python 3.2+

Copyright & License

Copyright (c) 2014 Chris Griffith - MIT License (see LICENSE)

About

Network Framework tech demo for Server-Client interation with persistant storage.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages