![]() |
kinetic-c
v0.12.0
Seagate Kinetic Protocol Client Library for C
|
#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) |
|
static |
Definition at line 184 of file send.c.
References Bus_GetListenerForSocket(), BUS_LOG_SNPRINTF, BusPoll_OnCompletion(), Listener_HoldResponse(), LOG_SENDER, SEND_NOTIFY_LISTENER_RETRIES, SEND_NOTIFY_LISTENER_RETRY_DELAY, syscall_poll(), and bus::udata.
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 | ||
) |
Definition at line 208 of file send.c.
References BUS_ASSERT, Bus_BackpressureDelay(), BUS_LOG_SNPRINTF, Bus_ProcessBoxedMessage(), BUS_SEND_UNDEFINED, boxed_msg::fd, LISTENER_EXPECT_BACKPRESSURE_SHIFT, LOG_SENDER, boxed_msg::out_seq_id, boxed_msg::result, SEND_NOTIFY_LISTENER_RETRY_DELAY, bus_msg_result_t::status, syscall_poll(), and bus::udata.