URY playd
C++ minimalist audio player
io.cpp File Reference

Implementation of the non-virtual aspects of the IoCore class. More...

#include <algorithm>
#include <cassert>
#include <csignal>
#include <cstring>
#include <sstream>
#include <string>
#include <uv.h>
#include "errors.hpp"
#include "messages.h"
#include "player.hpp"
#include "response.hpp"
#include "io.hpp"
+ Include dependency graph for io.cpp:

Go to the source code of this file.

Typedefs

typedef long ssize_t
 

Functions

void UvAlloc (uv_handle_t *, size_t suggested_size, uv_buf_t *buf)
 The function used to allocate and initialise buffers for client reading.
 
void UvCloseCallback (uv_handle_t *handle)
 The callback fired when a client connection closes.
 
void UvReadCallback (uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
 The callback fired when some bytes are read from a client connection.
 
void UvListenCallback (uv_stream_t *server, int status)
 The callback fired when a new client connection is acquired by the listener.
 
void UvWriteCallback (uv_write_t *req, int status)
 The callback fired when a response has been sent to a client.
 
void UvUpdateTimerCallback (uv_timer_t *handle)
 The callback fired when the update timer fires.
 
void UvSigintCallback (uv_signal_t *handle, int signum)
 The callback fired when SIGINT occurs.
 
void UvShutdownCallback (uv_shutdown_t *handle, int status)
 The callback fired when a client is shut down.
 

Detailed Description

Implementation of the non-virtual aspects of the IoCore class.

The implementation of IoCore is based on libuv, and also makes use of various techniques mentioned in the uvbook.

See also
io.hpp

Definition in file io.cpp.