metaproxy  1.13.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 62 of file pipe.cpp.

Constructor & Destructor Documentation

Pipe::Rep::Rep ( )
private

Definition at line 86 of file pipe.cpp.

References m_fd, and m_socket.

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

Member Function Documentation

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

Definition at line 74 of file pipe.cpp.

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

Definition at line 92 of file pipe.cpp.

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

Friends And Related Function Documentation

friend class Pipe
friend

Definition at line 63 of file pipe.cpp.

Member Data Documentation

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

Definition at line 65 of file pipe.cpp.

Referenced by Rep().

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

Definition at line 66 of file pipe.cpp.

Referenced by Rep().


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