on_writable requires message variable due to type expected, on_readable also requires unsigned char for buffer
@@ -14,7 +14,7 @@ static neat_error_code
on_readable(struct neat_flow_operations *ops)
{
uint32_t bytes_read = 0;
- char buffer[32];
+ unsigned char buffer[32];
if (neat_read(ops->ctx, ops->flow, buffer, 31, &bytes_read, NULL, 0) == NEAT_OK) {
buffer[bytes_read] = 0;
@@ -30,7 +30,8 @@ on_readable(struct neat_flow_operations *ops)
static neat_error_code
on_writable(struct neat_flow_operations *ops)
{
- neat_write(ops->ctx, ops->flow, "Hi!", 3, NULL, 0);
+ const unsigned char message[] = "Hi!";
+ neat_write(ops->ctx, ops->flow, message, 3, NULL, 0);
return NEAT_OK;
}
