Skip to main content

Library for calling methods over sockets

Project description

Installing

To install use the command python -m pip install Network-Script.

Basic Tutorial

Server

To start off import the Server class:

from netsc import Server

Then create a subclass of the Server class, defining bind_addr and possibly sock_family, sock_type, and sock_proto:

class MyServer(Server):
    bind_addr = ('', 1920)

Then create an instance, define the object it wraps, and accept a connection:

server = MyServer(wrapped_obj)
server.accept()

Client

To start off import the Server class:

from netsc import Client

Then create a subclass of the Server class, possibly defining sock_family, sock_type, and sock_proto:

class MyClient(Client):
    pass

Then create an instance, define the object it wraps, and connect to a server:

client = MyClient(wrapped_obj)
client.connect(('localhost', 1920))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

Network_Script-1.0.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page