Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion hl7apy/mllp.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def setup(self):
''.join([self.sb.decode('ascii'), r"(([^\r]+\r)*([^\r]+\r?))", self.eb.decode('ascii'), self.cr.decode('ascii')]))
self.handlers = self.server.handlers
self.timeout = self.server.timeout
self.encoding = self.server.char_encoding

StreamRequestHandler.setup(self)

Expand Down Expand Up @@ -164,11 +165,12 @@ class MLLPServer(ThreadingTCPServer):
"""
allow_reuse_address = True

def __init__(self, host, port, handlers, timeout=10, request_handler_class=MLLPRequestHandler):
def __init__(self, host, port, handlers, timeout=10, char_encoding='utf-8', request_handler_class=MLLPRequestHandler):
self.host = host
self.port = port
self.handlers = handlers
self.timeout = timeout
self.char_encoding = char_encoding
ThreadingTCPServer.__init__(self, (host, port), request_handler_class)


Expand Down