libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::tcpsockbuf::tcpsockbuf ( const tcpsockbuf src)

Object copy constructor.

Parameters
[in]srcthe source object
Exceptions
std::bad_alloc
csdbg::exception

Definition at line 52 of file tcpsockbuf.cpp.

References m_address.

53  :
54 streambuf(src),
55 m_address(NULL),
56 m_port(src.m_port)
57 {
58  m_address = new i8[strlen(src.m_address) + 1];
59  strcpy(m_address, src.m_address);
60 }
61 
62 catch (...) {
63  close();
64 
65  delete[] m_data;
66  m_data = NULL;
67  m_address = NULL;
68 }
char i8
8-bit signed integer
Definition: config.hpp:72
i8 * m_address
Peer IP address (numerical, IPv4)
Definition: tcpsockbuf.hpp:40
i32 m_port
Peer TCP port.
Definition: tcpsockbuf.hpp:42
streambuf()
Object default constructor.
Definition: streambuf.cpp:20
i8 * m_data
String data.
Definition: string.hpp:42
virtual streambuf & close()
Close the stream.
Definition: streambuf.cpp:130