mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 07:00:59 +01:00
implment server.close
This commit is contained in:
parent
c986b99ddc
commit
48b4ac4a8d
@ -167,7 +167,11 @@ Server::ListenTCP (const Arguments& args)
|
||||
Handle<Value>
|
||||
Server::Close (const Arguments& args)
|
||||
{
|
||||
Server *server = Server::Unwrap(args.Holder());
|
||||
|
||||
oi_server_close(&server->server_);
|
||||
|
||||
return Undefined();
|
||||
}
|
||||
|
||||
oi_socket*
|
||||
@ -449,7 +453,6 @@ Socket::Write (const Arguments& args)
|
||||
oi_socket_write(&socket->socket_, buf);
|
||||
|
||||
} else return ThrowException(String::New("Bad argument"));
|
||||
|
||||
|
||||
return Undefined();
|
||||
}
|
||||
@ -610,5 +613,6 @@ NodeInit_net (Handle<Object> target)
|
||||
target->Set(String::NewSymbol("Server"), server_template->GetFunction());
|
||||
|
||||
NODE_SET_METHOD(server_template->InstanceTemplate(), "listenTCP", Server::ListenTCP);
|
||||
NODE_SET_METHOD(server_template->InstanceTemplate(), "close", Server::Close);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user