Commit bd2f52b6 authored by Stephen D's avatar Stephen D
Browse files

Examples and basic added

parent 9d77edf1
# AX26
This is meant to be a successor to the AX25 protocol. It has many advantages:
* Unlimited data sizes (Broken up into smaller packets seamlessly)
* Configurable packet sizes
* Built in compression (Level 9 gzip)
* IDs that are basically limitless (Up to the size of the packet)
* Error correction (MD5)
The library is very WIP and should not be used in production. Classes and functions are subject to change.
There is a client and a server class. The client is made to connect to the server, and the server will accept connections from as many clients as you want, spawning a new thread for each.
Please look at the example code for more information.
- License
\ No newline at end of file
import time
import kiss2
import ax26
k = kiss2.TCPKISS(host='localhost', port=8001)
x = ax26.Client(k, "CLIENT_CALLSIGN-SSID") # The client's SSID
x.connect("SERVER_CALLSIGN-SSID") # The server's SSID
data_to_send = b'Hello server, this is client!' # Notice that this is a byte array
start = time.time()
print("SENT " + str(len(data_to_send)) + "BYTES IN " + str(time.time() - start) + " SECONDS")
while True:
r = x.receive_data() # Wait for data from server and then exit
if r is not None:
\ No newline at end of file
import kiss
import ax26
k = kiss.TCPKISS(host='localhost', port=8001)
x = ax26.Server(k, "SERVER_CALLSIGN-SSID") # The server's SSID
class handler:
def __init__(self, client_call):
print(b"New connection from " + client_call)
self.their_callsign = client_call
def on_recv(self, data):
print (data)
x.send_data(self.their_callsign, b"Data received. Here is a reply!")
def on_disconnect(self):
print(self.their_callsign + b" disconnected")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment