python-network
Python module for easy networking
Loading...
Searching...
No Matches
network.py File Reference

Go to the source code of this file.

Classes

class  network.Socket
 Connection object. More...
 
class  network.Server
 Listen on a network port and accept connections. More...
 

Namespaces

namespace  network
 

Functions

 network.set_log_output (file)
 Change target for log().
 
 network.log (*message, filename=None, line=None, funcname=None, depth=0)
 Log a message.
 
 network.lookup (service)
 Convert int or str with int or service to int port.
 
 network.wrap (i, o=None)
 Wrap two files into a fake socket.
 
 network.iteration (block=False)
 Do a single iteration of the main loop.
 
 network.fgloop ()
 Wait for events and handle them.
 
 network.bgloop ()
 Like fgloop, but forks to the background.
 
 network.endloop (force=False)
 Stop a loop that was started with fgloop() or bgloop().
 
 network.add_read (fd, cb, error=None)
 
 network.add_write (fd, cb, error=None)
 
 network.add_timeout (abstime, cb)
 
 network.add_idle (cb)
 
 network.remove_read (handle)
 
 network.remove_write (handle)
 
 network.remove_timeout (handle)
 
 network.remove_idle (handle)
 

Variables

str network.modulename = 'network'
 
 network.default
 
bool network.have_ssl = True
 
str network.makestr = lambda x(x, 'utf8', 'replace') if isinstance(x, bytes) else x
 
 network.log_output = sys.stderr
 
bool network.log_date = False