[webkit-help] WebSocket failing silently to connect

Julien Chaffraix julien.chaffraix at gmail.com
Thu Dec 31 04:33:45 PST 2009


Hi,

> However using the qtlauncher from webkit (built from SVN trunk
> yesterday, rev 52605), doing "new WebSocket(...)" doesn't try to make
> a connection to the server, and doesn't produce any errors in the
> inspector console.
> I've tried all sorts, but my basic test is serving something like the
> above HTML from http://127.0.0.1:8000 - which works as expected in
> chrome.
>
> The build-webkit script does build websockets by default, and
> window.WebSocket exists, but just refuses to connect to anything.
>
> Should this be working? If anyone has it working, could you share the
> SVN revision number of your build so I can see if that revision works
> for me?

The QT network code used by the WebSocket is not implemented in the
trunk (see http://trac.webkit.org/browser/trunk/WebCore/platform/network/qt/SocketStreamHandleSoup.cpp
[filed https://bugs.webkit.org/show_bug.cgi?id=33077 about this
misnaming]).

As you mention, the WebSocket cross-platform code is build: this
explains why you can instantiate a JavaScript WebSocket object and
window.WebSocket exists but all the network part is just stubbed thus
no connection will be done.

Hope it helps.

Best regards,
Julien


More information about the webkit-help mailing list