From: Devis Battisti Date: 2008-10-29T23:04:50+09:00 Subject: socket from python to ruby I'd want to port this code from python to ruby: self.sckt = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) self.sckt.bind((self.CFG['smsc']['local_host'], self.CFG['smsc']['local_port'])) self.sckt.connect((self.CFG['smsc']['remote_host'], self.CFG['smsc']['remote_port'])) self.sckt.send(mex) recv = self.sckt.recv(4096) self.sckt.close() The remote host is a router for an SMSC service. The script is tested and works correctly. I don't understand if I've to create a client or a server socket... bye Devis_ -- Posted via http://www.ruby-forum.com/.