 
 #### ESL client
 class eslClient extends net.Socket
-  constructor: (intercept_response) ->
+  constructor: (response) ->
     @on 'connect', ->
-      connectionListener @, intercept_response
+      connectionListener @, response
     super()
 
 exports.createClient = -> return new eslClient()

#### Connection Listener (socket events handler)
# This is modelled after Node.js' http.js

connectionListener= (socket,intercept_response) ->

  new_response = ->
    res = new eslResponse socket
    if intercept_response?
      res.intercept_response = intercept_response
    return res

  socket.setEncoding('ascii')
  parser = new eslParser socket

        event = headers['Content-Type']
    # Build request and response and send them out.
    req = new eslRequest headers,body
    res = new response socket
    if exports.debug
      util.log util.inspect event:event, req:req, res:res
    socket.emit event, req, res
  # Get things started
  socket.emit 'esl_connect', new response socket

#### ESL Server

class eslServer extends net.Server
  constructor: (requestListener,response) ->
    @on 'connection', (socket) ->
      socket.on 'esl_connect', requestListener
      connectionListener socket, response
    super()

# You can use createServer(callback) from your code.
