mikebrock / jboss-websockets Goto Github PK
View Code? Open in Web Editor NEWWebSockets for JBoss AS7
Home Page: http://www.jboss.org
WebSockets for JBoss AS7
Home Page: http://www.jboss.org
Hello mikebrock,
I'd like to test your websocket example.
I read your README text and i noticed, that you calling the private constructor of "TextFrame":
@OverRide
protected void onReceivedFrame(WebSocket socket) throws IOException {
[...]
socket.writeFrame(new TextFrame("Hey, there!"));
}
}
}
May you like to change it :)
Furthermore I'd like to ask you, if you have a working example by using your jboss-websockets?
I tried to integrate atmosphere framework and your jboss-websockets in jboss 7, but i didn't get it :(
JBoss seems to believe that the websocket connection is good and alive, while Chrome 19 throws error - WebSocket handshake: 'Upgrade' header is missing, and never completes connection.
Hi,
Apologies if I have this wrong but I believe there may be a possibility for an infinite, or at least a long running, tight-loop in the case where an application's WebSocket doesn't read a received frame's content inside onReceivedFrame. It is caused by...
WebSocketServlet (Lines 164:167)
My understanding is that "event.isReadReady()" will always return true until the frame is read from the socket.
HTH
Cheers,
Alex
Hi,
I just encountered with this issue after upgrading to Google Chromium 20:
Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch
Because of this error jboss-websockets implementation does not work on browsers which takes this header strictly.
I found that when no protocol is specified in the request by the client the Sec-WebSocket-Protocol
response header must be null
instead of "*"
.
/subprotocol/
Either a single value representing the subprotocol the server
is ready to use or null. The value chosen MUST be derived
from the client's handshake, specifically by selecting one of
the values from the |Sec-WebSocket-Protocol| field that the
server is willing to use for this connection (if any). If the
client's handshake did not contain such a header field or if
the server does not agree to any of the client's requested
subprotocols, the only acceptable value is null. The absence
of such a field is equivalent to the null value (meaning that
if the server does not wish to agree to one of the suggested
subprotocols, it MUST NOT send back a |Sec-WebSocket-Protocol|
header field in its response). The empty string is not the
same as the null value for these purposes and is not a legal
value for this field. The ABNF for the value of this header
field is (token), where the definitions of constructs and
rules are as given in [RFC2616].
Hi mickebrock,
I've tested your example about websockets, I've used JBoss 1.7.2, firefox and chrome. The example works properly but when you close the socket, the socket doesn't close properly ,and then, you cannot open the socket again without refreshing the page. Is the feature "Close websocket" implemented?, because I've noticed that the event "onSocketClosed" doesn't fire.
Regards.
Using JBoss-7.2, I configured the server as described in the README, as well as copypasted the code from the WebServlet example in the README.
Further I wrote an Html which works against other web socket servers.
When I tried to reach the Servlet per URL :8080//websocket the server returned a 405, saying that it doesn't support GET. However trying to talk to it as a web socket yields no reaction.
Do you have an idea why this might be the case? Against which revisions of jboss-as has this been tested?
(Edit: I tried this with JBoss-7.1.3 and it didn't work either :/ )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.