sendToFd function
Sends data to the specified file descriptor.
This function sends the provided data to the specified file descriptor. If an optional file descriptor is provided, it will be sent along with the data.
Parameters:
socket: The integer file descriptor of the socket to send the data to.data: The data to be sent.fd: An optional file descriptor to be sent along with the data (default is -1).
Returns: The number of bytes sent.
Throws:
Exception: If an error occurs while sending the data.
Implementation
int sendToFd(int socket, Uint8List data, [int fd = -1]) =>
_implementation.sendToFd(socket, data, fd);