HawkTracer  0.10.0
tcp_listener.h
Go to the documentation of this file.
1 #ifndef HAWKTRACER_LISTENERS_TCP_LISTENER_H
2 #define HAWKTRACER_LISTENERS_TCP_LISTENER_H
3 
4 #include <hawktracer/timeline.h>
5 
6 #include <stddef.h>
7 
9 
10 typedef struct _HT_TCPListener HT_TCPListener;
11 
39  HT_Timeline* timeline, int port, size_t buffer_size, HT_ErrorCode* out_err);
40 
41 HT_API HT_TCPListener* ht_tcp_listener_create(int port, size_t buffer_size, HT_ErrorCode* out_err);
42 
44 
45 HT_API void ht_tcp_listener_callback(TEventPtr events, size_t size, HT_Boolean serialized, void* user_data);
46 
58 
60 
61 #endif /* HAWKTRACER_LISTENERS_TCP_LISTENER_H */
#define HT_API
Defines a directive for exporting/importing symbols from DLL.
Definition: macros.h:76
#define HT_DECLS_END
Defines an end of C linkage block.
Definition: macros.h:17
HT_API void ht_tcp_listener_destroy(HT_TCPListener *listener)
typedefHT_DECLS_BEGIN struct _HT_Timeline HT_Timeline
Definition: timeline.h:23
typedefHT_DECLS_BEGIN struct _HT_TCPListener HT_TCPListener
Definition: tcp_listener.h:10
HT_ErrorCode
Defines list of possible errors returned by library functions.
Definition: base_types.h:48
int HT_Boolean
A standard boolean type, possible values: HT_TRUE, HT_FALSE.
Definition: base_types.h:20
HT_API void ht_tcp_listener_callback(TEventPtr events, size_t size, HT_Boolean serialized, void *user_data)
HT_API HT_TCPListener * ht_tcp_listener_create(int port, size_t buffer_size, HT_ErrorCode *out_err)
#define HT_DECLS_BEGIN
Defines a beginning of C linkage block.
Definition: macros.h:16
HT_API HT_TCPListener * ht_tcp_listener_register(HT_Timeline *timeline, int port, size_t buffer_size, HT_ErrorCode *out_err)
Creates a tcp listener and registers it to a timeline.
HT_API void ht_tcp_listener_stop(HT_TCPListener *listener)
Stops listening to new events.
uint8_t * TEventPtr
A pointer to a list of HT_Event (or derived) objects.
Definition: base_types.h:22