Broadcasting data 
Author Message
 Broadcasting data

Does someone have an example of broadcasting data around a network using
Ruby, both sender and receiver code?

In case someone has a better suggestion (particularly one that doesn't
require writing any code), I'll explain what I'm trying to do ...

What I want to do is implement a facility to cut/paste across machines on
my network.

I run my mail and news clients on the machine that's connected to the internet,
but generally sit in front of one of a couple of other machines. I use VNC to
access mail and news.

Often, I read something interesting in a web browser on the machine
I'm sitting in front of and want to paste it into a message to send to
someone else.

Currently, I put it in a temporary file on an NFS mount, cat that file on
the central machine and the do the cut and paste there.

What I'd like to do is write a pair of X programs (Tk, GTK, whatever),
one for the central machine, to read strings and display them, ready for
cut/paste (or, if I'm feeling adventurous, stick them straight into the X
paste buffer or KDE's multi-line one).

The other program would run on the machine I'm working on, to allow me to
cut/paste strings to be sent to the other one.

I could write this such that the central one is a server and the others
send it messages, but I'd prefer to make it work via broadcast, so I can
pick up the strings on any one of the machines.



Sun, 04 Jan 2004 09:02:16 GMT  
 Broadcasting data
Sorry, I should have mentioned that, in case you didn't guess, these
machines are running Linux.

Hopefully, that doesn't matter, given that I want to write the code in Ruby,
but it might suggest a completely different approach to someone.



Sun, 04 Jan 2004 09:05:39 GMT  
 Broadcasting data

Quote:

> Sorry, I should have mentioned that, in case you didn't guess, these
> machines are running Linux.

hate to discourage you from writing Ruby, but have you tried VNC's
cross-machine clipboard thingie? if you hit F8 in a VNC viewer, there
are two options, "clipboard local -> remote" and "clipboard remote ->
local" that might work for you

--

You are in a maze of little twisting passages, all alike.



Sun, 04 Jan 2004 09:24:35 GMT  
 Broadcasting data

Quote:
> hate to discourage you from writing Ruby, but have you tried VNC's
> cross-machine clipboard thingie? if you hit F8 in a VNC viewer, there
> are two options, "clipboard local -> remote" and "clipboard remote ->
> local" that might work for you

Not in the slightest!  There's no way you could ever discourage me from
writing Ruby :-).

It makes sense that VNC would provide this kind of facility; I just didn't
know it existed.

This is the sort of thing I was hoping for when I explained what I was trying
to do.

Of course, I'd still be interested to read some code that does UDP
broadcast using Ruby, since that's something that could be useful one of
these days ... and would be interesting, even if I now have no specific
use for it.

Thanks for the quick solution !!



Sun, 04 Jan 2004 09:49:38 GMT  
 Broadcasting data
Hi,

In message "[ruby-talk:18018] Broadcasting data"

|Does someone have an example of broadcasting data around a network using
|Ruby, both sender and receiver code?

I'm not an expert on network programming, so all I can give you is
just a hint...

Use UDPSocket class, and "<broadcast>" as destination hostname.

                                                        matz.



Sun, 04 Jan 2004 11:37:02 GMT  
 Broadcasting data

Quote:

>    Speaking of which, does anyone know if there are any efforts to
> create a spread library for Ruby?

> http://www.spread.org/

A ruby interface appears to come with the distribution.


Sun, 04 Jan 2004 16:17:37 GMT  
 Broadcasting data

S> Java Class to be used by applets or applications.
S> Perl interface.
S> Ruby interface.

 Where is the ruby interface ?

pigeon% du spread_src-3.16.0/
35      spread_src-3.16.0/perl/Spread-3.15.2-1.03
36      spread_src-3.16.0/perl
4       spread_src-3.16.0/java/docs/spread/CVS
197     spread_src-3.16.0/java/docs/spread
271     spread_src-3.16.0/java/docs
177     spread_src-3.16.0/java/splib_src
479     spread_src-3.16.0/java
33      spread_src-3.16.0/docs
1416    spread_src-3.16.0
pigeon%

Guy Decoux



Sun, 04 Jan 2004 16:40:47 GMT  
 Broadcasting data

Quote:


> S> Java Class to be used by applets or applications.
> S> Perl interface.
> S> Ruby interface.

>  Where is the ruby interface ?

Yes, I just had this same question.  The only answers I found:
http://www.ruby-lang.org/en/raa-list.rhtml?name=Ruby%2FSpread
http://www.ruby-lang.org/en/raa-list.rhtml?name=rb_Spread


Sun, 04 Jan 2004 16:43:49 GMT  
 Broadcasting data
On Wed, 18 Jul 2001 10:56:12 +0900

Quote:

> > hate to discourage you from writing Ruby, but have you tried VNC's
> > cross-machine clipboard thingie? if you hit F8 in a VNC viewer,
there
> > are two options, "clipboard local -> remote" and "clipboard remote
->
> > local" that might work for you

> It makes sense that VNC would provide this kind of facility; I just
didn't
> know it existed.

If you still have trouble copying between some X applications and VNC,
you can try autocutsel. It synchronizes the two cut and paste buffers
mostly used in X.

http://www.lepton.fr/tools/autocutsel

Mike.
midulo.



Sun, 04 Jan 2004 20:58:35 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Broadcasting data

2. Broadcasting over a local network ?

3. broadcasting patches information

4. How to do a broadcast message in ENVY ?

5. Broadcasting - ToolsIII - Blinker

6. net broadcast

7. FIG broadcasts

8. Network Broadcast messages in Windows

9. Mbone Broadcast of Two Rexx Symposium Sessions

10. UDP Broadcast Packet (offtopic)

11. Interactive ESDA TV broadcast Jan 26

12. Interactive ESDA TV broadcast Jan 26

 

 
Powered by phpBB® Forum Software