 
     public func send() {
         
-        defer {
-//            Session.close(request: request, response: self)
-            socket.release()
-        }
-        
-        do {
-            try socket.writeUTF8("HTTP/1.1 \(status.code) \(reasonPhrase)\r\n")
-            
-            var headers = self.headers()
-            
-            if body.count >= 0 {
-                headers["Content-Length"] = "\(body.count)"
-            }
-            
-            if true && body.count != -1 {
-                headers["Connection"] = "keep-alive"
-            }
-            
-            for (name, value) in headers {
-                try socket.writeUTF8("\(name): \(value)\r\n")
-            }
-            
-            try socket.writeUTF8("\r\n")
-            
-            try socket.writeUInt8(body)
-            
-        } catch {
-            print(error)
-        }
+        responder.sendResponse(self)
     }
 
     public func send(text text: String) {

        
        let serialised = "<html><meta charset=\"UTF-8\"><body>\(html)</body></html>"
        body = [UInt8](serialised.utf8)
        contentType = .Html
        status = .OK
        send()
    }
    
    public func render(path: String) {

        
        let text = "{\n\t\"error\": true,\n\t\"message\":\"\(error)\"\n}"
        body = [UInt8](text.utf8)
        contentType = .JSON
        status = .Error
        send()
    }
