Trying to make a function to send data from a specific client to a specific client

55 views
Skip to first unread message

stone stonix

unread,
Apr 19, 2013, 3:13:25 AM4/19/13
to sha...@googlegroups.com
HI all,
I am working on a pair programming project, in which there is a requirement such that , when a user clicks the read only mark it makes the editor in read only mode and send a flag to the other user to make his/her editor set to editing mode(Only 2 persons interact on a single code).

I have digged through everything but could not really reach to a final conclusion.

Any ideas?

Thanks in advance.

Jeremy Apthorp

unread,
Apr 19, 2013, 3:14:32 AM4/19/13
to sha...@googlegroups.com
Why not just let both users edit at once?


j


--
You received this message because you are subscribed to the Google Groups "ShareJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharejs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stephan Seidt

unread,
Apr 19, 2013, 3:29:48 AM4/19/13
to sha...@googlegroups.com
Two options, I think:

2. Open a separate communication channel for such events. It's simple to launch another server within the same node binary.

Obviously the server won't deny update actions of people who ignore the shout signal, but I think that's not crucial to get you further now.

stone stonix

unread,
Apr 22, 2013, 3:23:55 AM4/22/13
to sha...@googlegroups.com
@Jeremy Apthorp
It is a university requirement xD... thanks for stopping by.

@Stephan Seidt
what I understood is, 

I can make my own events at server side and then make the client respond accordingly ? or the shout is a built in event that identifies messages used inside from ones that are broadcasted?

Thanks all for stopping by

Wout Mertens

unread,
Apr 22, 2013, 4:50:17 AM4/22/13
to sha...@googlegroups.com
On Apr 22, 2013, at 9:23 , stone stonix <stone...@gmail.com> wrote:

> I can make my own events at server side and then make the client respond accordingly ? or the shout is a built in event that identifies messages used inside from ones that are broadcasted?

When you shout from the client all other clients connected to that doc get the shout event with the data you shouted.

So just shout "over" walkie-talkie style and the other side can start editing.

Wout.

stone stonix

unread,
Apr 22, 2013, 5:52:24 AM4/22/13
to sha...@googlegroups.com
Thanks all, I will give it a shot later and let you know about it D: 

cheers


On Friday, April 19, 2013 10:13:25 AM UTC+3, stone stonix wrote:

stone stonix

unread,
Apr 29, 2013, 2:48:17 PM4/29/13
to sha...@googlegroups.com
The shout trick worked out very well.
Thanks guys


On Friday, April 19, 2013 10:13:25 AM UTC+3, stone stonix wrote:
Reply all
Reply to author
Forward
0 new messages