MCPcopy Create free account
hub / github.com/Helidium/Mitol / SocketData

Method SocketData

src/Socket.cpp:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "Socket.h"
6
7MNS::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
22MNS::SocketData::~SocketData() {
23 if (this->request) delete (this->request);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected