Code Monkey home page Code Monkey logo

Comments (11)

gimite avatar gimite commented on June 29, 2024

Sorry wss support is implemented by a contributer Joel Martin http://github.com/kanaka and I haven't tried it myself. I also heard that it sometimes doesn't work from another person. If you ask Joel, he may give some hint.

from web-socket-js.

gimite avatar gimite commented on June 29, 2024

I believe I fixed the issue. Please pull the latest version and try again.

It seems trustSelfSignedCertificates, the flag I used, accepts only self-signed certificates but not officially signed certificates. I switched to trustAllCertificates.
http://www.google.com/codesearch/p?hl=ja#4__iCOd2LuI/trunk/as3crypto/src/com/hurlant/crypto/tls/TLSEngine.as&q=trustSelfSignedCertificates&sa=N&cd=1&ct=rc&l=804

from web-socket-js.

daralthus avatar daralthus commented on June 29, 2024

Hmm, I used self-signed before.. :) Anyway i tried out but nothing with https.. Does it work for you? There is no trace of it in the console. Before this with an older version an "https:" message appeared but no followup, now even that is missing.. :D

from web-socket-js.

gimite avatar gimite commented on June 29, 2024

I actually haven't tried myself. So it may have another issue... Did you confirm that it works with Chrome? If not, something is wrong with your configuration or code, not web-socket-js, because it just uses native WebSocket implementation in Chrome. "https:" message was just debug message submitted by mistake, so it's expected that it has disappeared in latest version.

from web-socket-js.

daralthus avatar daralthus commented on June 29, 2024

yes, I tried it works in chrome with both http and https and works in firefox too but only with http. actually the first debugging message is still "http" on http connections :)
anyway I tried it with different ports and secure connection. the problem seems to be before any communication. there is no fab inited message... and I get no policy errors when I should.

from web-socket-js.

gimite avatar gimite commented on June 29, 2024

You mean https+wss doesn't work but http+wss does work as well as http+ws? (Here https+wss means your HTML file is at https://... and it connects to WebSocket server at wss://...) Then there might be some restriction specific to running SWF hosted at https... Do you put both of your HTML file and SWF file at https://....?

from web-socket-js.

daralthus avatar daralthus commented on June 29, 2024

ok so here are the results:
when http + wss, the wss host is 127.0.0.1:3000 the console drops a can not connect (ioerror)
when http + wss at 127.0.0.1 and the policy allowed for port 443 there's a policy error
when http + wss at 127.0.0.1 and policy allowed for 80 console says
"[WebSocket] starting SSL/TLS
[WebSocket] request header: GET /testsomefeatures HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: 127.0.0.1 Origin: http://127.0.0.1 Cookie: Sec-WebSocket-Key1: 51d 80u 4 Z.) *3c9f v) 44 Sec-WebSocket-Key2: >7 8/ ^ V H766' V!,0 2/9
[WebSocket] sent key3: 3¨n×Á��·
[WebSocket] closed"
with https there is no attempt shown in the console so you must be right cuz I am serving the swf with the https server, but wss don't seems to work over http too. (Well actually that can be becouse of the different origin types...)
Later I will try serving static files over http to see what happens.

from web-socket-js.

kanaka avatar kanaka commented on June 29, 2024

daralthus: Are you still having this problem? If you have figured out the problem can you indicate as much? If you are still having the problem, can you indicate what your WebSockets server is?

BTW, I use wss successfully with web-socket-js and wsproxy (utility with noVNC).

from web-socket-js.

nerf avatar nerf commented on June 29, 2024

I just implemented wss support on my server (http + wss) and web-socket-js is working so far.

from web-socket-js.

gimite avatar gimite commented on June 29, 2024

Closing for now. Please reopen if anyone still see the issue.

from web-socket-js.

GiKyouGetsu avatar GiKyouGetsu commented on June 29, 2024

Hi @daralthus I get the same issue with this web_socket.js: https + wss, and the policy allowed for port 443 there's no policy error, but I can not open the scoket connection. how do you fix the issue?

from web-socket-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.