I think you can try socket.io.

Here is my blog to introduce it:

http://almandsky.blogspot.tw/2012/06/my-nodejs-web-site-social-chat.html

And this is my site using the socket.io with node.js.

http://chat.skychen.com/

Should be able to interact with different users if they are connected to the 
same socket server.

Thanks and Regards,

Sky

Ludovic VUE <[email protected]> 於 2012/7/27 下午6:18 寫道:

> I cannot use the sessions because i have to do actions to users in relations 
> with others.
> 
> For instance, user A click on a link, a pop-up appears on the browser of user 
> B, because there are linked by something, so i need the user B socket.
> 
> 2012/7/26 Alan Hoffmeister <[email protected]>
> Other cent, if you want sessions why don't  you use sessions instead of 
> sockets?
> http://expressjs.com/guide.html#session-support
> 
> --
> Att,
> Alan Hoffmeister
> 
> 
> 2012/7/26 Alan Hoffmeister <[email protected]>:
> > BTW, you can even transport your view with the socket :)
> >
> > <body>
> >     <a data-page="contact" href="#">Contact</a>
> >     <div id="#container">
> >     </div>
> > <body>
> >
> > <script type="text/javascript">
> >     $(document).ready(function(){
> >         $("a[data-page]").click(function(){
> >             socket.emit("render", $(this).attr("data-page");
> >         });
> >         socket.on("render-done", function(data){
> >             $("div#container").html(data);
> >         });
> >     });
> > </script>
> >
> > There are a lot of missing things but here are my 2 cents :)
> >
> > --
> > Att,
> > Alan Hoffmeister
> >
> >
> > 2012/7/26 Alan Hoffmeister <[email protected]>:
> >> Iframes are bad, use AJAX calls:
> >> https://github.com/defunkt/jquery-pjax/
> >>
> >> --
> >> Att,
> >> Alan Hoffmeister
> >>
> >>
> >> 2012/7/26 Diogo Resende <[email protected]>:
> >>> If you really have to reload the page, you can have one page to login and
> >>> then an iframe (if successful login) that spans the entire browser 
> >>> viewport
> >>> and opens all the pages. This way the parent document will not reload and 
> >>> it
> >>> can connect to you.
> >>>
> >>> --
> >>> Diogo Resende
> >>>
> >>> On Thursday, July 26, 2012 at 10:31 , Ludo wrote:
> >>>
> >>> Hello,
> >>>
> >>> I am building a website with nodeJS. The goal is the user launch a session
> >>> when he logs his account (so i create a socket), but i am looking for the
> >>> best way to keep this socket (on the client side) all along the 
> >>> navigation.
> >>>
> >>> For exemple, if the user go from "monsite.com/login.php" to
> >>> monsite.com/home.php i am going to loose the socket which i created in
> >>> "monsite.com/login.php"...
> >>>
> >>> How would you do that ? Is it really appropriate to work with PHP ? 
> >>> Because
> >>> i think you don't have this kind of problem with a website build with a JS
> >>> Framework like Blackbone.js !
> >>>
> >>> Thanks for your advices !
> >>>
> >>> --
> >>> Job Board: http://jobs.nodejs.org/
> >>> Posting guidelines:
> >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >>> You received this message because you are subscribed to the Google
> >>> Groups "nodejs" group.
> >>> To post to this group, send email to [email protected]
> >>> To unsubscribe from this group, send email to
> >>> [email protected]
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/nodejs?hl=en?hl=en
> >>>
> >>>
> >>> --
> >>> Job Board: http://jobs.nodejs.org/
> >>> Posting guidelines:
> >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> >>> You received this message because you are subscribed to the Google
> >>> Groups "nodejs" group.
> >>> To post to this group, send email to [email protected]
> >>> To unsubscribe from this group, send email to
> >>> [email protected]
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/nodejs?hl=en?hl=en
> 
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
> 
> 
> 
> -- 
> Ludovic VUE
> EPITECH - Promo 2014
> Chef de projet de MusicOnLive
> Développeur Web chez Moozar
> +33 (0)6 07 29 63 27
> 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to