Esempio n. 1
0
ssize_t socket_sendfln(int fd, const char *fmt, ...)
{
    char buffer[SOCKET_SENDFLNBUF_MAX] = {0};
    va_list args;

    va_start(args, fmt);
    vsnprintf(buffer, sizeof(buffer) - 3, fmt, args);
    va_end(args);

    strcat(buffer, "\r\n");

    return socket_sendall(fd, buffer, strlen(buffer));
}
uint32_t process_write(process_t* p, const char* bytes, uint32_t size) {
	return socket_sendall(p->pipe, bytes, size);
}