|
@ -144,6 +144,7 @@ void Connection::Init() { |
|
|
stream_.on_read = Connection::on_read; |
|
|
stream_.on_read = Connection::on_read; |
|
|
stream_.on_close = Connection::on_close; |
|
|
stream_.on_close = Connection::on_close; |
|
|
stream_.on_timeout = Connection::on_timeout; |
|
|
stream_.on_timeout = Connection::on_timeout; |
|
|
|
|
|
stream_.on_drain = Connection::on_drain; |
|
|
stream_.data = this; |
|
|
stream_.data = this; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -469,6 +470,11 @@ void Connection::OnTimeout() { |
|
|
Emit("timeout", 0, NULL); |
|
|
Emit("timeout", 0, NULL); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Connection::OnDrain() { |
|
|
|
|
|
HandleScope scope; |
|
|
|
|
|
Emit("drain", 0, NULL); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void Connection::OnEOF() { |
|
|
void Connection::OnEOF() { |
|
|
HandleScope scope; |
|
|
HandleScope scope; |
|
|
Emit("eof", 0, NULL); |
|
|
Emit("eof", 0, NULL); |
|
|