@@ -26,17 +26,17 @@ struct WebSocketWrapper {
2626
2727 /* Takes nothing returns nothing */
2828 template <bool SSL >
29- static void uWS_WebSocket_terminate (const FunctionCallbackInfo<Value> &args) {
29+ static void uWS_WebSocket_close (const FunctionCallbackInfo<Value> &args) {
3030 auto *ws = getWebSocket<SSL >(args);
3131 if (ws) {
3232 invalidateWsObject (args);
33- ws->terminate ();
33+ ws->close ();
3434 }
3535 }
3636
3737 /* Takes code, message, returns undefined */
3838 template <bool SSL >
39- static void uWS_WebSocket_close (const FunctionCallbackInfo<Value> &args) {
39+ static void uWS_WebSocket_end (const FunctionCallbackInfo<Value> &args) {
4040 auto *ws = getWebSocket<SSL >(args);
4141 if (ws) {
4242 int code = 0 ;
@@ -50,7 +50,7 @@ struct WebSocketWrapper {
5050 }
5151
5252 invalidateWsObject (args);
53- ws->close (code, message.getString ());
53+ ws->end (code, message.getString ());
5454 }
5555 }
5656
@@ -92,8 +92,8 @@ struct WebSocketWrapper {
9292
9393 /* Register our functions */
9494 wsTemplateLocal->PrototypeTemplate ()->Set (String::NewFromUtf8 (isolate, " send" ), FunctionTemplate::New (isolate, uWS_WebSocket_send<SSL >));
95+ wsTemplateLocal->PrototypeTemplate ()->Set (String::NewFromUtf8 (isolate, " end" ), FunctionTemplate::New (isolate, uWS_WebSocket_end<SSL >));
9596 wsTemplateLocal->PrototypeTemplate ()->Set (String::NewFromUtf8 (isolate, " close" ), FunctionTemplate::New (isolate, uWS_WebSocket_close<SSL >));
96- wsTemplateLocal->PrototypeTemplate ()->Set (String::NewFromUtf8 (isolate, " terminate" ), FunctionTemplate::New (isolate, uWS_WebSocket_terminate<SSL >));
9797 wsTemplateLocal->PrototypeTemplate ()->Set (String::NewFromUtf8 (isolate, " getBufferedAmount" ), FunctionTemplate::New (isolate, uWS_WebSocket_getBufferedAmount<SSL >));
9898
9999 /* Create the template */
0 commit comments