Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not support standard client api? #3022

Closed
1 task done
lifubang opened this issue Aug 1, 2017 · 2 comments
Closed
1 task done

Why not support standard client api? #3022

lifubang opened this issue Aug 1, 2017 · 2 comments

Comments

@lifubang
Copy link

lifubang commented Aug 1, 2017

stackoverflow: https://stackoverflow.com/questions/45433580/why-not-support-standard-client-api

I want to:

  • report a bug

Current behaviour

<script type="text/javascript">
var socket = new WebSocket('wss://ws.acmcoder.com:3333'); 

socket.onopen = function(event) { 
  socket.send('I am the client and I\'m listening!'); 

  socket.onmessage = function(event) { 
    console.log('Client received a message',event); 
  }; 

  socket.onclose = function(event) { 
    console.log('Client notified socket has closed',event); 
  }; 

  //socket.close() 
};
</script>

it displays: (Opcode -1)
By the way, If run the web socket server with Workman, It works.

Setup

  • OS: Windows 10
  • browser: chrome
  • socket.io version: 2.0.3
@darrachequesne
Copy link
Member

Socket.IO is not a WebSocket server. Please see ws instead.

@lifubang
Copy link
Author

lifubang commented Aug 2, 2017

@darrachequesne
But Socket.IO also provide WebSocket Server. I have found the succussful wss address when the client use socket.io library. But this address can't connet by other client library.
wss://ws.acmcoder.com:3333/socket.io/?EIO=3&transport=websocket&sid=e_M_bEN6KH8mfw9vAAAA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants