kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Functions
send.c File Reference
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <assert.h>
#include "bus.h"
#include "bus_poll.h"
#include "bus_types.h"
#include "bus_internal_types.h"
#include "listener.h"
#include "syscall.h"
#include "util.h"
#include "atomic.h"
#include "yacht.h"
#include "send_helper.h"
#include "send_internal.h"

Go to the source code of this file.

Functions

static bool attempt_to_enqueue_HOLD_message_to_listener (struct bus *b, int fd, int64_t seq_id, int16_t timeout_sec)
 
bool Send_DoBlockingSend (bus *b, boxed_msg *box)
 Do a blocking send. More...
 
void Send_HandleFailure (struct bus *b, boxed_msg *box, bus_send_status_t status)
 

Function Documentation

static bool attempt_to_enqueue_HOLD_message_to_listener ( struct bus b,
int  fd,
int64_t  seq_id,
int16_t  timeout_sec 
)
static
bool Send_DoBlockingSend ( struct bus b,
boxed_msg box 
)

Do a blocking send.

Returning true indicates that the message has been queued up for delivery, but the request or response may still fail. Those errors are handled by giving an error status code to the callback. Returning false means that the send was rejected outright, and the callback-based error handling will not be used.

Definition at line 59 of file send.c.

References attempt_to_enqueue_HOLD_message_to_listener(), BUS_LOG_SNPRINTF, BUS_SEND_TX_FAILURE, BUS_SEND_TX_TIMEOUT, BUS_SEND_UNREGISTERED_SOCKET, boxed_msg::fd, LOG_SENDER, boxed_msg::out_msg, boxed_msg::out_msg_size, boxed_msg::out_sent_size, boxed_msg::out_seq_id, Send_HandleFailure(), SendHelper_HandleWrite(), SHHW_DONE, SHHW_ERROR, SHHW_OK, syscall_poll(), boxed_msg::timeout_sec, boxed_msg::tv_send_start, bus::udata, and Util_Timestamp().

void Send_HandleFailure ( struct bus b,
boxed_msg box,
bus_send_status_t  status 
)