import socket
import struct
import random

def gen_data():
    a = random.randint(5, 10)
    b = random.randint(5, 10)
    c = random.randint(5, 10)

    header = struct.pack('!H', 1 + 2 + 4)
    data  = struct.pack('!BHI', a, b, c)
    print('Header({}), Payload({}), a({}), b({}), c({})'.format(header, data, a, b, c))

    return header, data

if __name__ == '__main__':
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(('127.0.0.1', 5000))
    for _ in range(20):
        h, d = gen_data()
        sock.sendall(h)
        sock.sendall(d)

    sock.close()

The entries are the properties of their respective owners.
Powered by Flask, SQLAlchemy, Pygments and Bootstrap.