Skip to content

Instantly share code, notes, and snippets.

@jgomo3
Last active March 3, 2022 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgomo3/762267a398bd27d22ef62281f588780f to your computer and use it in GitHub Desktop.
Save jgomo3/762267a398bd27d22ef62281f588780f to your computer and use it in GitHub Desktop.
A dummy MLLP server and an MLLP wrapper
#!/usr/bin/env
# mllp-constantly-server port response
#
# Listen on port `port` for messages and response always the same content:
# whatever is in the `response` file.
# Supposing mllp-wrap to excecute the `mllp-wrap.sh` script in this gist.
while true; do mllp-wrap $2; done | nc -k -l $1
#!/usr/bin/env bash
cat <(printf '\x0B') $1 <(printf '\x1C\x0D')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment