     handleServerError ctx, reason
 
 sendRequest = (ctx, route, options) ->
-  if route.type is 'tcp'
-    logger.info 'Routing tcp request'
+  if route.type is 'tcp' or 'mllp'
+    logger.info 'Routing socket 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

    options.ca = route.cert

  client = method.connect options, ->
    logger.info "Opened tcp connection to #{options.host}:#{options.port}"
    client.end requestBody

  bufs = []
  client.on 'data', (chunk) ->
    bufs.push chunk

  client.on 'error', (err) -> defered.reject err

  client.on 'end', ->
    if route.secured and not client.authorized
      return defered.reject new Error 'Client authorization failed'
    response.body = Buffer.concat bufs

#    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 = {}
