Client - Scauting-Burgum/ScautNet-python GitHub Wiki

A class to ease communication through sockets.

Methods

__init__

Creates a client with the provided hostname and port.

Arguments

  • hostname; the hostname of the server to connect to.
  • port; the port through which to connect to the server.

get_pipeline

Creates a pipeline for the client.

push

Pushes the provided data into the client's pipeline.

Arguments

  • data; The data to be pushed into the client's pipeline.

pull

Pulls data from the client's pipeline.

Arguments

  • timeout; If this timeout expires, queue.Empty will be raised. (Defaults to 1 second)

Raises

  • queue.Empty; If no data can be fetched before the timeout expires.

kill

Kills the client and it's pipeline.

Properties

alive

Returns True if the client is running and kill hasn't been called.

Implementation

Check the readme.