| 5 | #include "Socket.h" |
| 6 | |
| 7 | MNS::SocketData::SocketData(uv_poll_t *poll_h, int fd, SOCKET_TYPE type, MNS::Server *server) { |
| 8 | this->poll_h = poll_h; |
| 9 | this->fd = fd; |
| 10 | this->type = type; |
| 11 | this->server = server; |
| 12 | this->request = NULL; |
| 13 | this->response = NULL; |
| 14 | this->nodeRequestPlaceholder = nullptr; |
| 15 | this->nodeResponsePlaceholder = nullptr; |
| 16 | if (type != SOCKET_TYPE::LISTENING) { |
| 17 | this->request = new MNS::Request(this); |
| 18 | this->response = new MNS::Response(this); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | MNS::SocketData::~SocketData() { |
| 23 | if (this->request) delete (this->request); |
nothing calls this directly
no outgoing calls
no test coverage detected