mirror of
https://github.com/faye/websocket-driver-ruby.git
synced 2025-11-01 13:59:38 +00:00
24 lines
718 B
C
24 lines
718 B
C
#ifndef _wsd_read_buffer_h
|
|
#define _wsd_read_buffer_h
|
|
|
|
#include <string.h>
|
|
#include "queue.h"
|
|
#include "util.h"
|
|
|
|
|
|
typedef struct wsd_Chunk wsd_Chunk;
|
|
|
|
wsd_Chunk * wsd_Chunk_create(uint64_t length, uint8_t *data);
|
|
void wsd_Chunk_destroy(wsd_Chunk *chunk);
|
|
|
|
|
|
typedef struct wsd_ReadBuffer wsd_ReadBuffer;
|
|
|
|
wsd_ReadBuffer * wsd_ReadBuffer_create();
|
|
void wsd_ReadBuffer_destroy(wsd_ReadBuffer *buffer);
|
|
uint64_t wsd_ReadBuffer_push(wsd_ReadBuffer *buffer, uint64_t length, uint8_t *data);
|
|
int wsd_ReadBuffer_has_capacity(wsd_ReadBuffer *buffer, uint64_t length);
|
|
uint64_t wsd_ReadBuffer_read(wsd_ReadBuffer *buffer, uint64_t length, uint8_t *target);
|
|
|
|
#endif
|