summaryrefslogtreecommitdiff
path: root/src/node_net.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2009-12-07 17:55:19 +0100
committerRyan Dahl <ry@tinyclouds.org>2009-12-07 17:55:19 +0100
commitc1baa70fe5789de0c1eef7f2051a4e43fedced6e (patch)
treef8c93f86253529549cd0ec28d9e3a11604a06aec /src/node_net.h
parentee8530e0ee386492ca519004cfaa34de650b17b3 (diff)
downloadnode-c1baa70fe5789de0c1eef7f2051a4e43fedced6e.tar.gz
Attach/Detach -> Ref/Unref
Diffstat (limited to 'src/node_net.h')
-rw-r--r--src/node_net.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node_net.h b/src/node_net.h
index 6eccec9af..7ef6d4cd8 100644
--- a/src/node_net.h
+++ b/src/node_net.h
@@ -119,7 +119,7 @@ class Connection : public EventEmitter {
static void on_read(evcom_stream *s, const void *buf, size_t len) {
Connection *connection = static_cast<Connection*>(s->data);
- assert(connection->attached_);
+ assert(connection->refs_);
if (len == 0)
connection->OnEOF();
else
@@ -149,9 +149,9 @@ class Connection : public EventEmitter {
connection->OnClose();
- assert(connection->attached_);
+ assert(connection->refs_);
- connection->Detach();
+ connection->Unref();
}
static void on_timeout(evcom_stream *s) {
@@ -204,7 +204,7 @@ class Server : public EventEmitter {
int r = evcom_server_listen(&server_, address, backlog);
if (r != 0) return r;
evcom_server_attach(EV_DEFAULT_ &server_);
- Attach();
+ Ref();
return 0;
}
@@ -230,7 +230,7 @@ class Server : public EventEmitter {
Server *server = static_cast<Server*>(s->data);
evcom_server_detach(s);
server->OnClose(s->errorno);
- server->Detach();
+ server->Unref();
}
evcom_server server_;