User's Guide:i2p.socket

From Python-I2P.

Module i2p.socket allows Python programs to access the SAM proxy. It emulates the Python module socket.

With this module, a program can send stream data, datagrams, and raw packets across the I2P network.

Table of contents

Sockets

class socket(session, type, samaddr='127.0.0.1:7656', **kwargs)

The class socket defines the following properties:

The class socket defines the following methods:

accept(self)

bind(self, address) close(self) connect(self, address) connect_ex(self, address) getpeername(self) getsockname(self) gettimeout(self) listen(self, backlog) makefile(self, mode='r', bufsize=-1) recv(self, bufsize, flags=0) recvfrom(self, bufsize, flags=0) send(self, string, flags=0) sendall(self, string, flags=0) sendto(self, string, flags, address) setblocking(self, flag) settimeout(self, value)

Functions

Functions defined in module i2p.socket:

resolve(host, samaddr='127.0.0.1:7656')

Errors

class Error(i2p.Error)

class BlockError(Error) class ClosedError(Error) class NetworkError(Error)

Constants

Socket types

Packet sizes Flags for recv()