network.sockets.stdio - Palamecia/mint GitHub Wiki
Module network.sockets.stdio
Description
load network.sockets.stdio
This module provides the Network.StdioSocket class which provides inter-process communication over stdio.
Packages
Classes
Network.StdioSocket
This class provides an awaitable socket communication mechanism that trigger an event when data become available on the read part and can be used to performe inter-process communication.
This type is not copyable
Inherits
Public members
| Modifiers | Member | Description |
|---|---|---|
const |
bind | Binds the socket to the peer described by endpoint. The endpoint parameter sh... |
override const |
close | Closes the communication with the peer if the socket was in the Network.Stdio... |
const |
read | Returns the data contained in the read end of the socket. The socket's data i... |
const |
readSome | Returns at most count bytes of data contained in the read end of the socket. ... |
const |
write | Writes the data on the write end of the socket. |
Private members
| Modifiers | Member | Description |
|---|---|---|
@ const |
g_lib | Global library handle. |
final |
readHandle | Internal read handle. |
final |
writeHandle | Internal write handle. |
Descriptions
Network.StdioSocket.bind
def (self, endpoint)
Binds the socket to the peer described by endpoint. The endpoint parameter should be an instance of
Network.StdioEndpoint.
Network.StdioSocket.close
def (self)
Closes the communication with the peer if the socket was in the Network.Socket.State.Connected state or stops listening if the socket was in the Network.Socket.State.Listening state.
On success, the socket enter the Network.Socket.State.Closed state.
An instance of Exception.SocketError is raised on error.
Network.StdioSocket.g_lib
lib ('libmint-network')
Global library handle.
Network.StdioSocket.read
def (self)
Returns the data contained in the read end of the socket.
The socket's data is contained in an instance of Serializer.DataStream.
Network.StdioSocket.readHandle
none
Internal read handle.
Network.StdioSocket.readSome
def (self, count)
Returns at most count bytes of data contained in the read end of the socket.
The socket's data is contained in an instance of Serializer.DataStream.
Network.StdioSocket.write
def (self, data)
Writes the data on the write end of the socket.
Network.StdioSocket.writeHandle
none
Internal write handle.