Skip to content

Instantly share code, notes, and snippets.

@mradmacher
Last active August 29, 2015 14:18
Show Gist options
  • Save mradmacher/7363caa713d083755e9a to your computer and use it in GitHub Desktop.
Save mradmacher/7363caa713d083755e9a to your computer and use it in GitHub Desktop.
HL7 Client
require "socket"
host = '206.135.179.69'
port = 2575
s = TCPSocket.open(host, port)
msg = readlines
s.puts "\v" + msg[0..3].join("\r")
sleep 1
s.puts msg[4..-1].join("\r") + "\x1c\r"
p s.recv(1024)
s.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment