FastSocket

Official documentation for FastSocket, a Python library for building TCP/UDP servers and clients with support for secure (RSA) communication, chunked transfers, file transfer, and a hybrid TLS mode.

Designed for rapid prototyping and production use with multi-connection handling.

Features

Quick Install

pip install fastsocket

Quickstart

from fastsocket import FastSocketServer, SocketConfig, Queue

def handle_messages(messages: Queue):
    while not messages.empty():
        msg, addr = messages.get()
        print(f"[{addr}] {msg}")

config = SocketConfig(host="localhost", port=8080)
server = FastSocketServer(config)
server.on_new_message(handle_messages)
server.start()

Where to go next

  1. Getting Started — installation and first project.
  2. Guide — TCP, UDP, secure, chunks, and file transfer.
  3. Examples — complete, runnable examples.
  4. API Reference — classes and functions in detail.