Comments (10)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- Patch for /trunk/ phpwebsocket/websocket.class.php
- Decode broken when multiple calls same time
- Use on own Webspace on Strato
- what is" function $ (id)" is exactly doing in client code?
- update new version
- can't run the app
- Running on windows HOT 1
- Several Clients
- Patch for /trunk/ phpwebsocket/server.php
- Space ' ' in directory name
- on send button click getting InvalidStateError HOT 1
- Getting weird characters at the server side. HOT 1
- Patch for /trunk/ phpwebsocket/server.php
- Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing HOT 1
- Patch for /trunk/ phpwebsocket/client.html
- Patch for /trunk/ phpwebsocket/websocket.class.php
- Patch for /trunk/ phpwebsocket/server.php
- Patch for /trunk/ phpwebsocket/client.html
- Patch for /trunk/ phpwebsocket/chatbot.demo.php
- socket_tcp_bind: tcp_socket: Can't assign requested address
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpwebsocket.