/*
- * Copyright (C) 2016 "IoT.bzh"
+ * Copyright (C) 2016, 2017 "IoT.bzh"
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
int rc;
assert(ws->ws != NULL);
- rc = websock_dispatch(ws->ws);
+ rc = websock_dispatch(ws->ws, 0);
if (rc < 0 && errno == EPIPE)
afb_ws_hangup(ws);
}
return 0;
pfd.fd = ws->fd;
pfd.events = POLLIN;
- poll(&pfd, 1, 10);
+ poll(&pfd, 1, 10); /* TODO: make fully asynchronous websockets */
} else {
ws->buffer.size += (size_t)sz;
size -= (size_t)sz;
}
/*
- * Callback when 'close' command received from 'ws' with 'code' and 'size'.
+ * Callback when 'continue' command received from 'ws' with 'code' and 'size'.
*/
static void aws_on_continue(struct afb_ws *ws, int last, size_t size)
{