D
Devis Battisti
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_
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_