Running web socket server on opera 12

2019-09-01 03:08发布

问题:

I followed the instructions from here to install web socket node.js server on my WXP

I have a client and server written as follows: http://cjihrig.com/blog/creating-your-own-websocket-echo-client/ (ws_server.js)

Please let me know how can I make the web socket connection work...?
When I run the client, Alert displaye are as follows:
1. "Web sockets are supported" 2. "On Close : event / data :Undefined".

So how do i make nodejs work on opera?? It is working fine on google chrome??

I have enabled web sockets in opera config

Thanks
Sneha

回答1:

The current release version of Opera 12 is

Opera/9.80 (Macintosh; Intel Mac OS X 10.7.4; U; fr) Presto/2.10.289 Version/12.00

as you can see in the user agent string: Presto/2.10.289. The last version of WebSocket Protocol has been implemented in the CORE engine of Opera.

WebSocket API Update WebSocket implementation to RFC 6455
(Presto/2.11.337)

  • See: The WebSocket API
  • See: RFC 6455 - The WebSocket Protocol

but as you can see in Presto/2.11.337 which is not yet available in Opera 12. It will be available in a future release.



回答2:

According to protocol support section Opera uses very old Hixie draft 76. Maybe when you use ws you will have more luck. Furthermore I think you need a project which supports multiple transports(websockets/longpolling etc) like for example faye.js or socket.io