ruby socket通信

ruby socket通讯创建server创建clientrequire socketclient TCPSocket.open(localhost, 9999)clie

ruby socket通讯
创建server



创建client
require 'socket'client = TCPSocket.open('localhost', '9999')client.send("oracle\n", 0) # 0 means standard packetclient.close