Sha256: 47032e33dfa444b6173775db27826ffd3cd5bff6f1bd5b3d6c3e1498abafc36e
Contents?: true
Size: 439 Bytes
Versions: 4
Compression:
Stored size: 439 Bytes
Contents
module MelissaData::Server class TCP < Base def run(host=MelissaData::DEFAULT_TCP_ADDRESS, port=MelissaData::DEFAULT_TCP_PORT) trap("INT") { self.stop } trap("TERM") { self.stop } server.listen(host, port, self) puts "== MelissaData TCP server is now listening on #{host}:#{port}" server.run end def stop puts "== Stopping MelissaData TCP server" server.stop end end end
Version data entries
4 entries across 4 versions & 1 rubygems