Repository navigation
better usability - #74
Conversation
* Both on Client and Server * Updated the documented exceptions thrown (there were different mismatches)
…lient, to be more conforming to the W3C specs.
|
I think these changes along with the package being renamed to |
…t HandshakeData subclasses.
…stener interface. This is fired BEFORE the Http Handshake Request is sent. The same request object is passed again, together with the Response, when the Http Handshake Response is received.
…ttp Status (Message) and Http Method, as needed.
…ver.java. Users can implement such behavior them self easily.
There was a problem hiding this comment.
Like here, we have to update these package names too!
* The Draft class already contained a "Role": no need to pass one in.
|
Hey David. This all looks really nice. There's some rough edges we need to smooth out before we can merge. Just trying to run the ☮ ~/Java-WebSocket (remotes/david/master) ⚡ java -cp build/examples:dist/WebSocket.jar ChatServer
ChatServer started on port: 8887
Exception in thread "Thread-1" java.lang.NullPointerException
at org.java_websocket.WebSocket.handleRead(WebSocket.java:147)
at org.java_websocket.WebSocketServer.run(WebSocketServer.java:195)
at java.lang.Thread.run(Thread.java:680)The same thing happens when trying to connect with the |
|
a0a5f92 should fix the NullPointerException But we should not merge just yet. |
|
Build errors with the latest commits: |
|
xd my eclipse was out of sync with the file system |
|
Ok i think this pull request can be merged now. |
Huge API overhaul. This is in preparation for a v1.0 release of Java-WebSocket :)
|
Ok @Davidiusdadi beautiful :) merged |
|
@TooTallNate @Davidiusdadi Guys, I'm pretty sure some API (that I read up you wanted to have in the release) got lost along the way. |
|
The fact that the server makes use of a queue at all is an implementation detail that might change over time. It the future there may be multiple queues for several executors threads or data may be written directly in the send methods if necessary even though thats unlikely to happen. However you can be sure that the data you send out will be send out via the socket as soon as possible. I'd like know in which way you depend on this information. |
|
It's part of the specs. No other reason :) I'm just implementing what exactly the specs says: the sum of the data present in the buffer not yet sent. If the implementation changes, of course this calculation will have to change. |
|
I think @detro means http://dev.w3.org/html5/websockets/#dom-websocket-bufferedamount And so 👍 from me. |
|
There are a lot of specs could you link it? |
|
Lots? There is the "work in progress / dev" one: http://dev.w3.org/html5/websockets/#dom-websocket-bufferedamount Both define "bufferedAmount" in exactly the same way (for now). |
|
Btw, I catched up with your master and recommitted the bufferedAmount stuff: detro@58f939c you could pick that one directly. |
Huge API overhaul. This is in preparation for a v1.0 release of Java-WebSocket :)
This pull request smooths out some method signatures. The methods are now more similar to the ones used in javascript.
Changes
I will keep breaking changes which force users to change their implementing code as seldom as possible!