py2neo.wiring – Low-level network operations

Low-level module for network communication.

This module provides a convenience socket wrapper class (Wire) as well as classes for modelling IP addresses, based on tuples.

class py2neo.wiring.Address[source]

Address of a machine on a network.

family = None

Address family (AF_INET or AF_INET6)

exception py2neo.wiring.BrokenWireError[source]

Raised when a connection is broken by the network or remote peer.

class py2neo.wiring.IPv4Address[source]

Address subclass, specifically for IPv4 addresses.

class py2neo.wiring.IPv6Address[source]

Address subclass, specifically for IPv6 addresses.

class py2neo.wiring.Wire(s)[source]

Buffered socket wrapper for reading and writing bytes.

broken

Flag indicating whether this connection has been closed remotely.

close()[source]

Close the connection.

closed

Flag indicating whether this connection has been closed locally.

local_address

The local Address to which this connection is bound.

classmethod open(address, timeout=None, keep_alive=False)[source]

Open a connection to a given network Address.

read(n)[source]

Read bytes from the network.

remote_address

The remote Address to which this connection is bound.

secure(verify=True, hostname=None)[source]

Apply a layer of security onto this connection.

send()[source]

Send the contents of the output buffer to the network.

write(b)[source]

Write bytes to the output buffer.

exception py2neo.wiring.WireError[source]

Raised when a connection error occurs.