network.serializers.datagram - Palamecia/mint GitHub Wiki
Module
load network.serializers.datagram
This module provides the Network.DatagramSerializer class which implement the serializer interface to receive datagrams from a datagram based end point such as Network.UdpIp.
Packages
Classes
Network.Datagram
This class provides a representation for a datagram.
Members
Modifiers | Member | Description |
---|---|---|
- final |
buffer | Internal data buffer. |
+ const |
data | Returns the datagram's data. |
- final |
endpoint | Internal peer end point. |
+ const |
getEndpoint | Returns the datagram's end point. |
+ const |
new | Creates a new datagram for the data given by the data parameter. If this pa... |
+ const |
size | Returns the datagram's size. |
Network.DatagramSerializer
This class provides a serializer for datagram based end points. It should be used with instances of Network.AsynchronousChannel created with an instance of Network.UdpIp.
Members
Modifiers | Member | Description |
---|---|---|
+ const |
accept | Attempts to accept a connection on the end point. This method raises an insta... |
+ const |
appendMessage | Pushes the datagram described by datagram to the serializer's queue. |
+ const |
containsMessage | Returns true if the serializer's queue contains at least one datagram; othe... |
- final |
datagramQueue | Internal datagram queue. |
+ 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 datagram in the serializer's queue or none if the queue is... |
+ const |
read | Attempts to read data from the end point. Returns true if data was receive;... |
+ const |
write | Attempts to write data to the end point. Returns true if the data was succe... |
Descriptions
Network.Datagram.buffer
null
Internal data buffer.
Network.Datagram.data
def (self)
Returns the datagram's data.
Network.Datagram.endpoint
null
Internal peer end point.
Network.Datagram.getEndpoint
def (self)
Returns the datagram's end point.
Network.Datagram.new
def (self, data)
Creates a new datagram for the data given by the data
parameter.
If this parameter is an instance of Network.Datagram, this object
is returned as the new instance; otherwise the object is used for
the data to be sent using the datagram.
def (self, data, endpoint)
Creates a new datagram for the data given by the data
parameter.
The datagram is associated to the endpoint
.
Network.Datagram.size
def (self)
Returns the datagram's size.
Network.DatagramSerializer.accept
def (self, endpoint)
Attempts to accept a connection on the end point. This method raises an instance of Exception.InvalidNetworkOperation.
Network.DatagramSerializer.appendMessage
def (self, datagram)
Pushes the datagram described by datagram
to the serializer's queue.
Network.DatagramSerializer.containsMessage
def (const self)
Returns true
if the serializer's queue contains at least one
datagram; otherwise returns false
.
Network.DatagramSerializer.datagramQueue
null
Internal datagram queue.
Network.DatagramSerializer.isEmpty
def (const self)
Returns true
if the serializer's buffer is empty; otherwise
returns false
.
Network.DatagramSerializer.new
def (self)
Creates a new serializer.
Network.DatagramSerializer.nextMessage
def (self)
Returns the next datagram in the serializer's queue or none
if the
queue is empty. The datagram is then removed from the queue.
Network.DatagramSerializer.read
def (self, endpoint)
Attempts to read data from the end point. Returns true
if data was
receive; otherwise returns false
.
Network.DatagramSerializer.write
def (self, endpoint)
Attempts to write data to the end point. Returns true
if the data
was successfully sent; otherwise returns false
. After this call,
the sent data is removed from the buffer.