Open SabinoSisto opened 4 years ago
Why are you passing an array of strings instead of a single string? Where did you read that in the docs?
i want accept protocol ocpp1.6 or ocpp1.5 in server side how must define?
in client i change : var client = new W3CWebSocket('ws://localhost:8080/PROVA', 'ocpp1.6');
in server i changed: var connection = request.accept('ocpp1.6,ocpp1.5', request.origin);
this is new error: Error: Illegal character " " in subprotocol.
News for me?
i must accept protocol ocpp1.6 OR ocpp1.5 can you send me code to connection? Thank's
this is my client call:
var client = new W3CWebSocket('ws://localhost:8080/TEST', ['ocpp1.6','ocpp1.5']);
into server side: var connection = request.accept(['ocpp1.6','ocpp1.5'], request.origin);
error: TypeError: acceptedProtocol.toLocaleLowerCase is not a function at WebSocketRequest.accept (c:\Personale\Siti\eRiparto\node_modules\websocket\lib\WebSocketRequest.js:257:70) at WebSocketServer. (c:\Personale\Siti\eRiparto\app.js:53:30)
at WebSocketServer.emit (events.js:314:20)
at WebSocketServer.handleUpgrade (c:\Personale\Siti\eRiparto\node_modules\websocket\lib\WebSocketServer.js:217:14)
at Server.emit (events.js:314:20)
at onParserExecuteCommon (_http_server.js:640:14)
at onParserExecute (_http_server.js:573:3)
at HTTPParser.callbackTrampoline (internal/async_hooks.js:123:14)