Giter Club home page Giter Club logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Thank you so much for your attachment. I like the consolidated websocket 
class...no more SocketWebSocket and WebSocket! Also, I just got into this a few 
days ago and could never get it to handshake (even though it said 'done 
handshaking' the onopen would never fire...now it does! I will be interested in 
seeing what the difference was...(unless you would like to give me a hint!)

Thanks again for saving my sanity.

Original comment by [email protected] on 7 Oct 2010 at 4:45

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Thanks again for saving my sanity! That's very cool...or I will go nuts...

Thank you very much!! That's great!!

Original comment by [email protected] on 12 Oct 2010 at 1:56

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
a little problem...when we send the first word, no matter "hello" or "hi", the 
client has no display of the response. But the following word can get response.

Original comment by [email protected] on 12 Oct 2010 at 2:02

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Hi, I had the same experience, that the first msg is fail.
this had fixt it:
js:
        socket.onmessage = function(msg)
        {
            var mes,txt;
            set_message('neue nachricht: '+msg.data);

            mes = msg.data;
            // remove mystery char
            if(0 == mes[0].charCodeAt())
            {
                mes = mes.substring(1);
            } // if 

Original comment by [email protected] on 19 Oct 2010 at 1:26

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I have the same problem that the first word doesn't get a response. The socket 
onmessage event is actually not triggered (the first time) so the fix doesn't 
work. From the second message onwards it is all fine. Perhaps related to issue 
15 (http://code.google.com/p/phpwebsocket/issues/detail?id=15)?

(I am using Chrome 8.0.552.215 on Windows XP)

Original comment by [email protected] on 10 Dec 2010 at 10:34

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
My solution for this issue is to change line 102 in websocket.class.php to

socket_write($user->socket,$upgrade.chr(0).chr(255),strlen($upgrade)+2);

(so added a non-breaking space).

Original comment by [email protected] on 10 Dec 2010 at 12:57

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Hi, 
i have the same problem : the fist message always raise an "onerror" event on 
the client. The others messages works fine.
With the little trick above the first message don't raise an "onerror" event, 
but the event 'onerror' raise on the connection (no problem because websockets 
works properly after that).

Original comment by [email protected] on 7 Jan 2011 at 6:06

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
To remove the onerror message, remove the two new line at the end of the 
handshake ("\r\n\r\n").
There's also no need to add an empty frame after the handshake.

Original comment by [email protected] on 9 Feb 2011 at 3:55

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Thank you. also comment 6 fixed the problem of not sending the first message.

Original comment by [email protected] on 22 Feb 2011 at 2:10

from phpwebsocket.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
i can confirm that comment 6 fixes the issue as well

Original comment by [email protected] on 23 Jun 2011 at 2:50

from phpwebsocket.

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.