network.serializers.server - Palamecia/mint GitHub Wiki

Module

load network.serializers.server

This module provides the Network.ServerSerializer class which implement the serializer interface to accept incomming connections.

Packages

Classes

Network.ServerSerializer

This class provides a serializer for incomming connections. It should be used with instances of Network.AsynchronousChannel opened with Network.AsynchronousChannel.listen.

On new connection, an end point is created and pushed to a queue. This end point can be retrieved later by calling Network.AsynchronousChannel.read.

Members

Modifiers Member Description
+ const accept Attempts to accept a connection on the end point. Returns true if a new con...
+ const appendMessage Pushes the communication end point described by endpoint to the serializer'...
- final connectionQueue Internal pending end point queue.
+ const containsMessage Returns true if the serializer's queue contains at least one pending end po...
+ const isEmpty Returns true if the serializer's buffer is empty; otherwise returns false.
+ const new Creates a new serializer.
+ const nextMessage Returns the next pending end point in the serializer's queue or none if the...
+ const read Attempts to read data from the end point. This method raises an instance of E...
+ const write Attempts to write data to the end point. This method raises an instance of Ex...

Descriptions

Network.ServerSerializer.accept

def (self, endpoint)

Attempts to accept a connection on the end point. Returns true if a new connection was successfully accepted; otherwise returns false.

Network.ServerSerializer.appendMessage

def (self, endpoint)

Pushes the communication end point described by endpoint to the serializer's queue.

Network.ServerSerializer.connectionQueue

null

Internal pending end point queue.

Network.ServerSerializer.containsMessage

def (const self)

Returns true if the serializer's queue contains at least one pending end point; otherwise returns false.

Network.ServerSerializer.isEmpty

def (const self)

Returns true if the serializer's buffer is empty; otherwise returns false.

Network.ServerSerializer.new

def (self)

Creates a new serializer.

Network.ServerSerializer.nextMessage

def (self)

Returns the next pending end point in the serializer's queue or none if the queue is empty. The end point is then removed from the queue.

Network.ServerSerializer.read

def (self, endpoint)

Attempts to read data from the end point. This method raises an instance of Exception.InvalidNetworkOperation.

Network.ServerSerializer.write

def (self, endpoint)

Attempts to write data to the end point. This method raises an instance of Exception.InvalidNetworkOperation.