metaproxy  1.21.0
Private Member Functions | Private Attributes | Friends | List of all members
metaproxy_1::Pipe::Rep Class Reference
Inheritance diagram for metaproxy_1::Pipe::Rep:
Inheritance graph
Collaboration diagram for metaproxy_1::Pipe::Rep:
Collaboration graph

Private Member Functions

 Rep ()
 
bool nonblock (int s)
 
void close (int &fd)
 

Private Attributes

int m_fd [2]
 
int m_socket
 

Friends

class Pipe
 

Detailed Description

Definition at line 63 of file pipe.cpp.

Constructor & Destructor Documentation

◆ Rep()

Pipe::Rep::Rep ( )
private

Definition at line 87 of file pipe.cpp.

88 {
89  m_fd[0] = m_fd[1] = -1;
90  m_socket = -1;
91 }

Member Function Documentation

◆ close()

void Pipe::Rep::close ( int &  fd)
private

Definition at line 75 of file pipe.cpp.

76 {
77 #ifdef WIN32
78  if (fd != -1)
79  ::closesocket(fd);
80 #else
81  if (fd != -1)
82  ::close(fd);
83 #endif
84  fd = -1;
85 }
void close(int &fd)
Definition: pipe.cpp:75

◆ nonblock()

bool Pipe::Rep::nonblock ( int  s)
private

Definition at line 93 of file pipe.cpp.

94 {
95 #ifdef WIN32
96  unsigned long tru = 1;
97  if (ioctlsocket(s, FIONBIO, &tru) < 0)
98  return false;
99 #else
100  if (fcntl(s, F_SETFL, O_NONBLOCK) < 0)
101  return false;
102 #ifndef MSG_NOSIGNAL
103  signal (SIGPIPE, SIG_IGN);
104 #endif
105 #endif
106  return true;
107 }

Friends And Related Function Documentation

◆ Pipe

friend class Pipe
friend

Definition at line 64 of file pipe.cpp.

Member Data Documentation

◆ m_fd

int metaproxy_1::Pipe::Rep::m_fd[2]
private

Definition at line 66 of file pipe.cpp.

◆ m_socket

int metaproxy_1::Pipe::Rep::m_socket
private

Definition at line 67 of file pipe.cpp.


The documentation for this class was generated from the following file: