Comments (14)
Yes, this is a problem with Twiggy. See Issue #1
from sockjs-perl.
I just installed your master version of Twiggy. Should that fix the problem? (I can't check just yet, have to install everything else, too)
from sockjs-perl.
Yes, that should work. I use myself. I think... :)
from sockjs-perl.
Why not mention in the README.md that your own Twiggy is required?
That way this here issue will be un-needed.
from sockjs-perl.
On 03/06/2013 05:26 PM, Alexander Karelas wrote:
Why not mention in the README.md that your own Twiggy is required?
That way this here issue will be un-needed.
—
Reply to this email directly or view it on GitHub
#3 (comment).Yes. I am going to add that.
from sockjs-perl.
Is "$stringifying" the session object the only way to get a unique id out of it?
from sockjs-perl.
What do you need it for?
09.03.2013 7:23 ÐÏÌØÚÏ×ÁÔÅÌØ "Alexander Karelas" [email protected]
ÎÁÐÉÓÁÌ:
Is "$stringifying" the session object the only way to get a unique id out
of it?Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-14658354
.
from sockjs-perl.
I will need to keep track of which clients are in each room (to emulate the rooms functionality from socket.io). Also which rooms each client is in. This requires at least two hashes with unique ids as keys.
from sockjs-perl.
Also, is there a future-proof way to hook a new subroutine on the "user closed his connection" event?
I was thinking of replacing $socket->{"on_aborted"} with a subroutine that first executes what was there before, and then executes my own code. Does that seem right?
from sockjs-perl.
For some reason, "on_aborted" is executed twice on browser-reload.
from sockjs-perl.
Maybe providing a way for either subclassing and/or setting custom variables for the session object would be a good idea. This way you could save your own unique ids, and overwrite events.
As for "executed twice" this could a bug.
from sockjs-perl.
Ok, now you can set/get custom values by using:
$session->set(foo => 'bar');
$session->get('foo');
And overwrite session creation by providing you own factory:
SockJS->new(session_factory => sub { MySessionClass->new })
from sockjs-perl.
Both changes worked very well. Thank you.
from sockjs-perl.
Thanks, that helps. The demo still fails using FireFox 12 and 23 (makes initial contact, but aborts during the xhr post). IE 9 also appears to fail (xhr issues again?). On the plus side, the example code works fine now using web sockets in the latest version of Chrome.
I'm going to check the Perl module dependencies on my end again, then try to pull down the latest copy of the sockjs (JavaScript) library just to make sure this isn't a client or configuration issue.
from sockjs-perl.
Related Issues (11)
- Responses always returned chunked HOT 5
- Can't locate object method "read" via package "IO::File" HOT 1
- t/transport/jsonp-send.t and t/transport/xhr-send.t started to fail HOT 2
- "any" is not exported by the List::Util module HOT 2
- Client example HOT 6
- SockJS is not on CPAN HOT 6
- "Can't call method ... " HOT 5
- Multiplexing HOT 2
- [SockJS 0.03/0.04] Missing Test Dependency: Test::MonkeyMock HOT 2
- Minimum perl version HOT 1
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 sockjs-perl.