Lines Matching defs:that
80 NetServer* that = static_cast<NetServer*>(peer->data);
81 that->Emit("disconnect", nullptr);
92 NetServer* that = static_cast<NetServer*>(server->data);
95 that->Emit("error", nullptr);
98 if (that->clients_ == nullptr) {
99 that->clients_ = new NetClient();
102 tmp->next = that->clients_;
103 that->clients_ = tmp;
106 uv_tcp_init(that->loop_, (uv_tcp_t*)&that->clients_->tcp);
107 that->clients_->tcp.data = server->data;
108 uv_accept(server, (uv_stream_t*)&that->clients_->tcp);
109 uv_read_start((uv_stream_t*)&that->clients_->tcp, EchoAlloc, AfterRead);
111 that->Emit("connect", nullptr);
121 NetServer* that = static_cast<NetServer*>(handle->data);
123 for (NetClient* i = that->clients_; i != nullptr; i = i->next) {
128 napi_reference_unref(that->env_, that->thisVarRef_, &thisRefCount);
138 NetServer* that = static_cast<NetServer*>(req->data);
146 that->Emit("write", nullptr);
150 that->Emit("error", nullptr);
153 void NetServer::TakeDiffactionsByStatus(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf, NetServer* that)
164 sreq->data = that;
169 if (!that->serverClosed_) {
179 uv_close((uv_handle_t*)&that->tcpServer_, OnServerClose);
180 that->serverClosed_ = 1;
186 that->Emit("read", nullptr);
195 wr->req.data = that;
197 that->Emit("error", nullptr);
213 NetServer* that = static_cast<NetServer*>(handle->data);
219 TakeDiffactionsByStatus(handle, nread, buf, that);