This project is read-only.

Websocket Server quits after client connect

Nov 7, 2010 at 10:12 PM

Hi, I am currently migrating from one of the earlier releases of Nugget (even before the name Nugget was being used) to the r1 release.

I am running the server in a windows service to be able to have multiple server-instances running in one windows service and to have easy interoperability using wcf. Basically I have a named pipes endpoint running in the windows service accepting connections which can send data to the connected clients. This worked perfectly in the previous code. But even without this code the problem remains that starting the server works, my client can connect and the onopen event is fired in javascript. Unfortunately about 15 seconds later the onclose event is fired.

Any ideas?

Nov 7, 2010 at 11:23 PM

Appearantly the issue is in the SubProtocolModelFactoryStore.

The server is trying to get an instance for the subprotocol 'post', but the instances array is empty.

Nov 8, 2010 at 5:01 PM

Hi,

I'm sorry if the "release" is causing you problems.

I think i went a little overboard with the sub protocol stuff, it can be a little hard to follow the flow in that part of the project.

I'm currently working on decoupling the "server" and the "framework", so that the framework uses the server rather than being a part of it, i think that will help making the whole thing simpler.

 

Are you using a sub protocol, from javascript?

I see that the code is currently not checking whether you have registered a sub-protocol-model-factory (phew..), it just assumes you have, if you are using a sub protocol.

I've just pushed a bug fix attempt, hope that helps.

Nov 8, 2010 at 7:39 PM

Hi,

the release is actually working perfectly now even with all this extra stuff.

The entire subprotocol is an unkown feature for me, but I got it working with the r1-release in a very stable way.

I am very impressed to see the progress on this project, especially since I compare the latest release to the very old version. Your code cleaned up very nicely and is extremely extensible.

Again, thumbs up on this project.