mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
24 lines
485 B
C
24 lines
485 B
C
#include "webfuse_provider/impl/message.h"
|
|
|
|
#include <stdlib.h>
|
|
#include <libwebsockets.h>
|
|
|
|
extern struct wfp_message * wfp_message_create(
|
|
char * data,
|
|
size_t length)
|
|
{
|
|
struct wfp_message * message = malloc(sizeof(struct wfp_message));
|
|
message->data = data;
|
|
message->length = length;
|
|
message->raw_data = data - LWS_PRE;
|
|
|
|
return message;
|
|
}
|
|
|
|
void wfp_message_dispose(
|
|
struct wfp_message * message)
|
|
{
|
|
free(message->raw_data);
|
|
free(message);
|
|
}
|