title: Python HL7 Listener socket message acknowledgement
body: <p>I am trying to create HL7 listener in python. I am able to receive the messages  through socket , but not able to send valid acknowledgement</p>
  
  <pre><code>ack=u"\x0b MSH|^~\\&amp;|HL7Listener|HL7Listener|SOMEAPP|SOMEAPP|20198151353||ACK^A08||T|2.3\x1c\x0d MSA|AA|153681279959711 \x1c\x0d"
  ack = "MSH|^~\&amp;|HL7Listener|HL7Listener|SOMEAPP|SOMEAPP|20198151353||ACK^A08||T|2.3 \r MSA|AA|678888295637322 \r"
  ack= bytes(ack,'utf-8')
  </code></pre>
  
  <p>Python code :</p>
  
  <pre><code>def listner_hl7():
      s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      try:
          s.bind((socket.gethostname(), 4444))
      except Exception as e:
          print(str(e))
      s.listen(5)
      while True:
          clientSocket, addr = s.accept()
          message = clientSocket.recv(2048)
          id = (str(message.splitlines()[0]).split('|')[9])
  
          print('received {} bytes from {}'.format(
              len(message), addr))
  
          print('sending acknowledgement: ')
          ack = b"\x0b MSH|^~\\&amp;|HL7Listener|HL7Listener|SOMEAPP|SOMEAPP|20198151353||ACK^A08||T|2.3\x1c\x0d MSA|AA|" + bytes(
              id, 'utf-8') + b" \x1c\x0d"
  
          clientSocket.send(ack)
  </code></pre>