Lines Matching full:socket
5 #include "socket.h"
18 #include <sys/socket.h>
28 int socket; member
50 fd = socket(AF_UNIX, SOCK_SEQPACKET, 0); in pldm_transport_mctp_demux_open()
77 pollfd->fd = ctx->socket; in pldm_transport_mctp_demux_init_pollfd()
148 length = recv(demux->socket, NULL, 0, MSG_PEEK | MSG_TRUNC); in pldm_transport_mctp_demux_recv()
160 recv(demux->socket, buf, length, 0); in pldm_transport_mctp_demux_recv()
174 bytes = recvmsg(demux->socket, &msg, 0); in pldm_transport_mctp_demux_recv()
231 ssize_t rc = sendmsg(demux->socket, &msg, 0); in pldm_transport_mctp_demux_send()
256 demux->socket = pldm_transport_mctp_demux_open(); in pldm_transport_mctp_demux_init()
257 if (demux->socket == -1) { in pldm_transport_mctp_demux_init()
262 if (pldm_socket_sndbuf_init(&demux->socket_send_buf, demux->socket)) { in pldm_transport_mctp_demux_init()
263 close(demux->socket); in pldm_transport_mctp_demux_init()
278 close(ctx->socket); in pldm_transport_mctp_demux_destroy()
298 * the socket, without closing the fd that is being used by the consumer in pldm_transport_mctp_demux_init_with_fd()
300 demux->socket = dup(mctp_fd); in pldm_transport_mctp_demux_init_with_fd()
301 if (demux->socket == -1) { in pldm_transport_mctp_demux_init_with_fd()
306 if (pldm_socket_sndbuf_init(&demux->socket_send_buf, demux->socket)) { in pldm_transport_mctp_demux_init_with_fd()
307 close(demux->socket); in pldm_transport_mctp_demux_init_with_fd()
319 return ctx->socket; in pldm_transport_mctp_demux_get_socket_fd()