mirror of
https://github.com/anope/anope.git
synced 2026-06-27 09:26:38 +02:00
Fixed the pipengines
This commit is contained in:
@@ -10,7 +10,7 @@ class PipeIO : public SocketIO
|
||||
* @param sz How much to read
|
||||
* @return Number of bytes received
|
||||
*/
|
||||
int Recv(Socket *s, char *buf, size_t sz) const
|
||||
int Recv(Socket *s, char *buf, size_t sz)
|
||||
{
|
||||
static eventfd_t dummy;
|
||||
return !eventfd_read(s->GetFD(), &dummy);
|
||||
@@ -21,7 +21,7 @@ class PipeIO : public SocketIO
|
||||
* @param buf What to write
|
||||
* @return Number of bytes written
|
||||
*/
|
||||
int Send(Socket *s, const Anope::string &buf) const
|
||||
int Send(Socket *s, const Anope::string &buf)
|
||||
{
|
||||
return !eventfd_write(s->GetFD(), 1);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class PipeIO : public SocketIO
|
||||
* @param sz How much to read
|
||||
* @return Number of bytes received
|
||||
*/
|
||||
int Recv(Socket *s, char *buf, size_t sz) const
|
||||
int Recv(Socket *s, char *buf, size_t sz)
|
||||
{
|
||||
static char dummy[512];
|
||||
while (read(s->GetFD(), &dummy, 512) == 512);
|
||||
@@ -21,7 +21,7 @@ class PipeIO : public SocketIO
|
||||
* @param buf What to write
|
||||
* @return Number of bytes written
|
||||
*/
|
||||
int Send(Socket *s, const Anope::string &buf) const
|
||||
int Send(Socket *s, const Anope::string &buf)
|
||||
{
|
||||
static const char dummy = '*';
|
||||
Pipe *pipe = debug_cast<Pipe *>(s);
|
||||
|
||||
@@ -23,7 +23,7 @@ class PipeIO : public SocketIO
|
||||
* @param sz How much to read
|
||||
* @return Number of bytes received
|
||||
*/
|
||||
int Recv(Socket *s, char *buf, size_t sz) const
|
||||
int Recv(Socket *s, char *buf, size_t sz)
|
||||
{
|
||||
static char dummy[512];
|
||||
return recv(s->GetFD(), dummy, 512, 0);
|
||||
@@ -34,7 +34,7 @@ class PipeIO : public SocketIO
|
||||
* @param buf What to write
|
||||
* @return Number of bytes written
|
||||
*/
|
||||
int Send(Socket *s, const Anope::string &buf) const
|
||||
int Send(Socket *s, const Anope::string &buf)
|
||||
{
|
||||
static const char dummy = '*';
|
||||
Pipe *pipe = debug_cast<Pipe *>(s);
|
||||
|
||||
Reference in New Issue
Block a user