Comments (16)
Thanks- I'll check this out and see what I can confirm.
from alchemy-websockets.
Confirmed that it's masking when it shouldn't; our implementation of client and server are coupled, so we'll have to do some refactoring to get this working. We're on it, though!
from alchemy-websockets.
+1 seems to be showing up with the latest version of Chrome (version 19).
from alchemy-websockets.
Thanks for the reply. It is good to hear that you're getting to fix this issue,
looking forward to see new batch soon!
from alchemy-websockets.
+1 here. If anyone knows of a quick fix, please contact me. All of a sudden I'm getting bombarded with Chrome folk with this problem. :(
from alchemy-websockets.
@stuorguk you could try to use https://github.com/gimite/web-socket-js and set window.WEB_SOCKET_FORCE_FLASH = true
; I'll be trying to fix this particular issue tonight
from alchemy-websockets.
Thanks. I dont actually use the client code. Just the server side. I'm just trying to get my head around the masking to see if it's something I can disable quickly.
from alchemy-websockets.
Actually I have drilled-down abit to see what was happening in my case.
By comparing data being sent & received, I have found that the message dispatched from server side does not contain header bytes, which should be presented in web-socket frames to describe what data it is.
So if you are looking for a quick fix, you could try to manually create and attach header bytes in your code before you send message.
refer to http://tools.ietf.org/html/rfc6455#section-5.2 for header bytes structure
from alchemy-websockets.
My code has been hacked about quite a bit, but the header bytes are there from my server. Removing the masking is actually easy. Remove the mask bit, and comment out the mask method call. Seem to have a problem with UTF-8 decoding now... investigating.
from alchemy-websockets.
Mine is working now. As above, I just commented out the masking code where it builds a packet. I forgot to take out the mask key from the header which caused UTF-8 errors.
from alchemy-websockets.
Stuorguk, can you be a little more specific about what you did? I started commenting out the masking code as well, but now I'm getting unexpected characters encountered issues.
from alchemy-websockets.
I got mine working now too. Just a couple specifics:
In the Hybi10 implementation I commented out the following lines:
In DataFrame.AsFrame():
Mask(); //Uses _header, must call ToBytes before calling Mask
In FrameHeader.ToBytes():
data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked
data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked
data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked
Mask = random.Next(Int32.MaxValue);
headerBytes.Add(BitConverter.GetBytes(Mask));
I test it with both the Flash Socket and against Chrome 19 and it seems ok now. Haven't tested yet against older versions of Chrome.
from alchemy-websockets.
Thanks; I can put in an emergency fix for now and work on updating the
client later. It gets tricky in that the WebSocket client uses the same
dataframe class, but it may be as simple as passing in a parameter when
creating the data frame to tell it when to mask. This kills the integration
tests.
Does anyone use the client? Would it be a problem to break it for a day or
two, to get the server running?
On Fri, May 18, 2012 at 11:07 AM, jrperina <
[email protected]
wrote:
I got mine working now too. Just a couple specifics:
In the Hybi10 implementation I commented out the following lines:
In DataFrame.AsFrame():
Mask(); //Uses _header, must call ToBytes before calling Mask
In FrameHeader.ToBytes():
data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked
data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked
data[0] = (byte) (data[0] | 0x80); //Tells us that this data is masked
Mask = random.Next(Int32.MaxValue);
headerBytes.Add(BitConverter.GetBytes(Mask));I test it with both the Flash Socket and against Chrome 19 and it seems ok
now. Haven't tested yet against older versions of Chrome.
Reply to this email directly or view it on GitHub:
from alchemy-websockets.
Hi,
I'm experiencing this issue too. jrperina's quick fix works for Chrome but it doesn't work with Safari or an iOS emulator. Has a patch been released for this issue yet?
Thanks,
Colin.
from alchemy-websockets.
Appears to work and passes all of my tests; used @jrperina fix.
from alchemy-websockets.
@coldwired Safari and iOS use an old version of the websocket protocol that we haven't built in support for yet; we'll re-open that now that we've moved past this chrome issue.
from alchemy-websockets.
Related Issues (20)
- Cannot run another Server instance HOT 3
- Max concurrent connections clients
- I get error at server when parse message
- No further connections can be made, after Client drops off network. HOT 2
- Quick Edit to Home Page Website
- Header longer then 512 bytes maybe incorrectly parsed HOT 1
- WebSocketClient.Connect fails with NullReferenceException HOT 2
- Stop() doesn't work. HOT 2
- Connection closed before receiving a handshake response HOT 1
- Calling websocket.close() from client, causes server to crash[Fatal signal 6 (SIGABRT)]
- Wrong UTF symbol in long string. HOT 1
- GUI Application doesn't closes at all HOT 1
- Performance degrades when sending 100s of websocket messages
- Problem with client reconnection
- Broadcast Method?
- Alchemy onClose Event & Port already in use
- Client receives incomplete data HOT 3
- Server does not seem to send connected status to client
- Can't start two ServerSockets with different ports HOT 1
- In OnReceive CurrentContext.Data remains null
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 alchemy-websockets.