kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
listener_task.h
Go to the documentation of this file.
1 /*
2 * kinetic-c
3 * Copyright (C) 2015 Seagate Technology.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20 #ifndef LISTENER_TASK_H
21 #define LISTENER_TASK_H
22 
23 #include "bus_types.h"
24 #include "bus_internal_types.h"
26 
28 void *ListenerTask_MainLoop(void *arg);
29 
32 
34 void ListenerTask_ReleaseRXInfo(listener *l, struct rx_info_t *info);
35 
37 bool ListenerTask_GrowReadBuf(listener *l, size_t nsize);
38 
40 void ListenerTask_AttemptDelivery(listener *l, struct rx_info_t *info);
41 
44  rx_info_t *info, bus_send_status_t status);
45 
47 uint16_t ListenerTask_GetBackpressure(struct listener *l);
48 
51 
52 #endif
53 
bool ListenerTask_GrowReadBuf(listener *l, size_t nsize)
Grow the listener's read buffer to NSIZE.
Record in table for partially processed messages.
void ListenerTask_ReleaseRXInfo(listener *l, struct rx_info_t *info)
Release an INFO to the listener's info pool.
A queue message, with a command in the tagged union.
Receiver of responses.
void ListenerTask_ReleaseMsg(listener *l, listener_msg *msg)
Release a message to the listener's message pool.
void ListenerTask_DumpRXInfoTable(listener *l)
Dump the RX info table.
void * ListenerTask_MainLoop(void *arg)
Listener's main loop – function pointer for pthread start function.
Definition: listener_task.c:45
void ListenerTask_NotifyMessageFailure(listener *l, rx_info_t *info, bus_send_status_t status)
Notify the client that the event in INFO has failed with STATUS.
bus_send_status_t
Definition: bus_types.h:193
uint16_t ListenerTask_GetBackpressure(struct listener *l)
Get the current backpressure from the listener.
void ListenerTask_AttemptDelivery(listener *l, struct rx_info_t *info)
Attempt delivery of the message boxed in INFO.