36 lines
476 B
C++
36 lines
476 B
C++
#ifndef MEMGRAPH_SERVER_UV_TCPSTREAM_HPP
|
|
#define MEMGRAPH_SERVER_UV_TCPSTREAM_HPP
|
|
|
|
#include <uv.h>
|
|
|
|
#include "core.hpp"
|
|
#include "uvloop.hpp"
|
|
|
|
namespace uv
|
|
{
|
|
|
|
class TcpStream
|
|
{
|
|
public:
|
|
TcpStream(UvLoop& loop);
|
|
|
|
template <typename T>
|
|
T* data();
|
|
|
|
template <typename T>
|
|
void data(T* value);
|
|
|
|
void close(callback_t callback);
|
|
|
|
operator uv_handle_t*();
|
|
operator uv_tcp_t*();
|
|
operator uv_stream_t*();
|
|
|
|
private:
|
|
uv_tcp_t stream;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|