This is the class for controlling the network communication between
multiple online canvases inbounded on the current machine, or outbounded
to multiple remote machines. The primary goal of this class is to
establish and maintain multiple connections by spawning a single server
process thread/daemon which waits for incoming/inbounding connections and
acknowledging them upon the user's grant; and to make
outgoing/outbounding requests to a remote system based on the user's
request. The application may be in several states at a time: it may act
as a server without having a session with another machine; it may may be
a server without an inbound connection, but an established outbounded
connection with one or more remote machines; it may be a server with
inbounded connections, but no outbounded connections; or it may be both
connected inboundly and outboundly.
|
|
__init__(this)
Initializes the network, by creating a new server daemon process. |
source code
|
|
|
|
client(this,
host,
port=1832)
Connects to a remote host machine, given it's ip and, optionally,
it's port number. |
source code
|
|
|
|
server(this,
port)
Starts-up the server on the current machine, by binding a sever daeom
process to the a ip address, and port number. |
source code
|
|
|
|
|
|
|
|
|
|
receive(this,
c)
A server thread immediately jumps into receving mode, where in the
lifetime of its connection with the remote client machine, it
receives and queues each event that is transmitted. |
source code
|
|