9 #ifndef __libutilxx__sella__net__Pipe_H__
10 #define __libutilxx__sella__net__Pipe_H__
12 #include "../../common.h"
13 #include "UnixSocket.h"
15 #include <sys/socket.h>
25 typedef std::shared_ptr<Pipe> shared;
28 static const size_t ReadSizeDefault = 65536;
31 Pipe(
bool nonBlock =
true)
throw (SocketException);
34 void operator=(
const Pipe &sock) =
delete;
36 ssize_t write(
const void *data,
size_t len)
throw (SocketException);
37 ssize_t write(
const std::string &data)
throw (SocketException);
38 ssize_t write(
const std::vector<uint8_t> &data)
throw (SocketException);
39 ssize_t read(
void *data,
size_t len)
throw (SocketException);
40 ssize_t read(std::string &data,
size_t len = ReadSizeDefault)
throw (SocketException);
41 ssize_t read(std::vector<uint8_t> &data,
size_t len = ReadSizeDefault)
throw (SocketException);
46 static const Pipe::shared shared_ptr(
bool nonBlock =
true)
throw (SocketException);