native_socket library
Classes
- UnixSocket
- Represents a Unix domain socket.
Functions
-
closeFd(
int socket) → void - Closes the specified socket.
-
createAnonymousFile(
int size) → int - Creates an anonymous file with the specified size.
-
createTmpFile(
String name) → int - Creates a temporary file with the specified name.
-
createUnixSocket(
String path) → int - Creates a Unix domain socket with the specified path.
-
read(
int socket, [int size = 1024]) → SocketMessage - Reads data from the specified socket.
-
readAll(
int socket, [int bufferSize = 1024]) → SocketMessage - Reads all available data from the specified socket.
-
sendToFd(
int socket, Uint8List data, [int fd = -1]) → int - Sends data to the specified file descriptor.
-
socketHasData(
int socket, [int timeout = 0]) → bool - Checks if the specified socket has data available to be read.
-
writeToFd(
int fd, Uint8List data) → dynamic - Writes the given data to the specified file descriptor.