简体   繁体   中英

Connecting Websocket to Qt Fortune Server with JavaScript

I am trying to connect to the Qt Fortune Server Example, with this HTML/Javascript Code : http://jsfiddle.net/gr0bhrqr/

I edited this line of code:

websocket = new WebSocket("ws://yourDomainNameHere.org/");

In Chrome, I get this error in the console:

WebSocket connection to 'ws://localhost:50745/' failed: Error during WebSocket handshake: net::ERR_CONNECTION_ABORTED

I also tried with Firefox - no connection. My firewall is off - the given port is free.

What can I do?

The Qt Fortune Server example does not implement the Websocket protocol.

You can find Qt Websocket examples here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM