Ruby
Bottom of this page.
|
<<last
56fc8125
anonymous
2026-01-18 22:03
require "socket"
def send_file(host, port, name)
puts "#{name} send to ..."
.....
end
def receive_file(port)
s0 = TCPServer.open(port)
.....
end
で,ファイルの送受信ソケットが簡潔に書けて
チョッと工夫すれば実用的に使えることがいいね
以前は,NFS等でファイルのやり取りをしていた.
最近は,Rubyのソケット通信が便利杉
ポール・グレアム曰く「簡潔さは力なり」
Top of this page.
|
<<last
Name
E-mail
Post text
Agreement
Attach
limit: 1536KB
Send to other nodes
Turn off first post for new BBS when you want to save your anonymity.
Error in timestamp
To save anonymity. Turn off for consecutive post.
POST
(Ruby/5/0.0MB)
Powered by
shinGETsu
.