Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generic-server

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generic-server

Python generic TCP/UDP server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').

  • 1.1.3
  • PyPI
  • Socket score

Maintainers
1

Generic-Server

Python generic TCP/UDP server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').

Status: Beta
Authors: Carsten König

Purpose

Sometimes you need a TCP or UDP server that answers with a specific strings to a given request. For testing different network components in a lab environment, some components in the network might not be available. In order to simulate their presence, Generic-Server answers TCP or UDP string requests using modules either with pre-defined responses or simulated behaviour.

Installation

pip install generic-server

How to use

In order to start a Generic-Server, start the server with the desired config:

genericserver <protocol> <port> <responder>

protocol: either TCP or UDP
port: port to listen on
responder: one out of 'ok', 'reflect', 'manual' or 'json'

    ok: Always sends 'ok' as an answer.
    reflect: Reflects the request string back to the sender.
    manual: Prompts the user to manually enter an answer.
    json: Get answers from a json document. For nested json, a delimiter can be chosen (default ':').
    Example:

    {"test": {
            "a": "1",
            "b": 2
            }
    }
    

    Request: test:a
    Response: 1

License

GNU GPLv3 License

Author

Carsten König

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc