I’d like to know how to establish a connection between me and another
computer via a ruby script.
Also If you happen to know a good place where I can learn networking on
ruby that’d be great.
I’d like to know how to establish a connection between me and another
computer via a ruby script.
Also If you happen to know a good place where I can learn networking on
ruby that’d be great.
cynic limbu wrote in post #1137205:
Also If you happen to know a good place where I can learn networking on
ruby that’d be great.
tutorials:
https://www6.software.ibm.com/developerworks/education/l-rubysocks/l-rubysocks-a4.pdf
https://leejava.wordpress.com/2009/08/24/udp-client-and-server-in-ruby/
book (picaxe) :
http://ruby-doc.com/docs/ProgrammingRuby/html/tut_io.html
http://ruby-doc.com/docs/ProgrammingRuby/html/ospace.html
http://ruby-doc.com/docs/ProgrammingRuby/html/lib_network.html
snippets :
http://www.java2s.com/Code/Ruby/Network/CatalogNetwork.htm
(this is not java only…)
I’d like to know how to establish a connection between me and another
computer via a ruby script.
see tcp_server and tcp_client and gserver
udp_server and udp_client
Ruby remoting (ie. drb)
in java2s snippets
goog luck…
goog luck…
Thank you very much :]
Am 19.02.2014 14:03, schrieb cynic limbu:
I’d like to know how to establish a connection between me and another
computer via a ruby script.
That’s rather vague… What kind of connection?
Regards,
Marcus
unknown wrote in post #1137222:
Am 19.02.2014 14:03, schrieb cynic limbu:
I’d like to know how to establish a connection between me and another
computer via a ruby script.That’s rather vague… What kind of connection?
Regards,
Marcus
unknown wrote in post #1137222:
Am 19.02.2014 14:03, schrieb cynic limbu:
I’d like to know how to establish a connection between me and another
computer via a ruby script.That’s rather vague… What kind of connection?
Regards,
Marcus
Apologies, I’m not good with TCP/IP thing so I was wondering a type of
connection like chatting (3-4 people chat), Or sending files.
Sending data
My computer --> Server --> My another computer
Receiving data
My another computer --> Server --> My computer
I’m thinking that it would be better If it was a direct connection
rather than the server standing in front of computers.
It is possible? Without a server? To send and receive files?
Last question would be
Can I turn my computer itself into a server? Or does it have to be a
website?
Don’t worry about my computer not being able to handle the requests,
Just two computers sending/receiving data.
Am 20.02.2014 10:44, schrieb cynic limbu:
Apologies, I’m not good with TCP/IP thing so I was wondering a type of
connection like chatting (3-4 people chat), Or sending files.Sending data
My computer --> Server --> My another computerReceiving data
My another computer --> Server --> My computer
If you’re not thinking about a webapp and HTTP requests or using
other existing protocols (like ftp, …) you probably want TCPServer
and TCPSocket.
Learning about threads might be useful, too, when you want to
write a chat server and client.
See the links Regis d’Aubarede provided, and you should easily
find more examples online, even specific tutorials on building
a chat server.
Regards,
Marcus
On 02/19/2014 05:03 AM, cynic limbu wrote:
I’d like to know how to establish a connection between me and another
computer via a ruby script.Also If you happen to know a good place where I can learn networking on
ruby that’d be great.
GServer (in Ruby’s stdlib) is probably the easiest place to start:
http://rdoc.info/stdlib/gserver/GServer
Here’s an example of using it for a chat server:
https://gist.github.com/presidentbeef/767666#file-rubychat-rb
-Justin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs