network - Palamecia/mint GitHub Wiki
Description
This module provides classes and functions to interacte with a network.
It provides 3 main classes:
- The Network.EndPoint interface allow to describe a network endpoint by providing informations used to access a device using a set of specific protocols of the layers 1 to 4 of the OSI model.
- The Network.AsynchronousChannel class handle asynchronous exchanges with a device. This device is described by an instance of Network.EndPoint or a derived class. The Network.SynchronousChannel can also be used to perform exchanges synchronously.
- The Network.Scheduler class synchronize exchanges. It manages a set of channels described by an instance of Network.AsynchronousChannel or a derived class and can work synchronously or asynchronously using a thread.
It also provides a set of protocol specific client and server classes that implement the layers 5 to 7 of the OSI model. That allow basic communication with a device using a specific protocol.
Example:
load network.scheduler
load network.endpoints.tcpip
load network.protocol.http.client
Network.Scheduler.instance().startSynchronizationLoop()
if client = Network.Http.Client(Network.TcpIp(server_host, server_port)) {
client.onMessage = def (self, channel) {
send_to_browser(self.read())
}
client.watch()
client.connect()
// ...
client.close()
client.unwatch()
}
Network.Scheduler.instance().stopSynchronizationLoop()
Packages
Enums
- Network.EndPoint.IOStatus
- Network.EndPoint.State
- Network.IpSocketOption
- Network.IpV4SocketOption
- Network.IpV6SocketOption
- Network.Scheduler.PollEvent
- Network.SocketOption
- Network.TcpSocketOption
Classes
- Network.AsynchronousChannel
- Network.AsynchronousChannel.DataQueue
- Network.DataSerializer
- Network.Datagram
- Network.DatagramSerializer
- Network.EndPoint
- Network.Ftp.Client
- Network.Http.Client
- Network.Http.Message
- Network.Http.RequestHandler
- Network.Http.Serializer
- Network.Http.Server
- Network.IpEndPoint
- Network.IpV4MulticastGroup
- Network.IpV4MulticastSourceGroup
- Network.IpV6MulticastGroup
- Network.JsonRpc.Client
- Network.JsonRpc.Exception
- Network.JsonRpc.Message
- Network.JsonRpc.RequestHandler
- Network.JsonRpc.Serializer
- Network.JsonRpc.Server
- Network.Scheduler
- Network.Scheduler.PollDescriptor
- Network.ServerSerializer
- Network.SocketLinger
- Network.SocketTime
- Network.SynchronousChannel
- Network.TcpIp
- Network.TextSerializer
- Network.UdpIp