     options.ca = route.cert
 
   client = method.connect options, ->
-    logger.info "Opened tcp connection to #{options.host}:#{options.port}"
-    client.end requestBody
+    logger.info "Opened #{route.type} connection to #{options.host}:#{options.port}"
+    if route.type is 'tcp'
+      client.end requestBody
+    else if route.type is 'mllp'
+      client.write requestBody
+    else
+      logger.error "Unkown route type #{route.type}"
 
   bufs = []
   client.on 'data', (chunk) ->
     bufs.push chunk
+    if route.type is 'mllp' and chunk.toString().indexOf(mllpEndChar) > -1
+      logger.debug 'Received MLLP response end character'
+      client.end()
 
   client.on 'error', (err) -> defered.reject err
 
   client.on 'end', ->
+    logger.info "Closed #{route.type} connection to #{options.host}:#{options.port}"
+
     if route.secured and not client.authorized
       return defered.reject new Error 'Client authorization failed'
     response.body = Buffer.concat bufs

    handleServerError ctx, reason

sendRequest = (ctx, route, options) ->
  if route.type is 'tcp'
    logger.info 'Routing tcp request'
    return sendSocketRequest ctx, route, options
  else if route.type is 'mllp'
    logger.info 'Routing mllp request'
    return sendMLLPSocketRequest ctx, route, options
  else
    logger.info 'Routing http(s) request'
    return sendHttpRequest ctx, route, options

#    status: <200 if all work, else 500>
#    body: <the received data from the socket>
#    timestamp: <the time the response was recieved>
#
# Supports both normal and MLLP sockets
###
sendSocketRequest = (ctx, route, options) ->
  mllpEndChar = String.fromCharCode(0o034)

  defered = Q.defer()
  requestBody = ctx.body
  response = {}
