     
     sendCount++
     if debugAsyncWrites {
-      println("sending data \(sendCount) size \(bufsize)")
+      println("async send[\(sendCount)] size \(bufsize) \(buffer)")
     }
     
     // in here we capture self, which I think is right.
-    dispatch_write(fd!, asyncData, queue) { asyncData, error in
+    dispatch_write(fd!, asyncData, queue) {
+      asyncData, error in
+      
+      if self.debugAsyncWrites {
+        println("did send[\(self.sendCount)] size \(bufsize) error \(error)")
+      }
+      
       self.sendCount = self.sendCount - 1 // -- fails?
-      if self.debugAsyncWrites {
-        println("did send data \(self.sendCount) error \(error)")
-      }
       
       if self.sendCount == 0 && self.closeRequested {
+        if self.debugAsyncWrites {
+          println("closing after async write ...")
+        }
         self.close()
         self.closeRequested = false
       }
     }
     
+    asyncData = nil
+    
     return true
   }
 
-  func send(buffer: CChar[], length: Int? = nil) -> Int {
+  func send<T>(buffer: T[], length: Int? = nil) -> Int {
     var writeCount : Int = 0
     let bufsize    = length ? UInt(length!) : UInt(buffer.count)
     let fd         = self.fd!

  var encoding: UInt { return NSUTF8StringEncoding }
  
  func write(string: String) {
    if let buffer = string.cStringUsingEncoding(encoding) {
      if buffer.count > 0 {
        self.asyncWrite(buffer)
      }
    }
  }

  let debugAsyncWrites = false
  
  func asyncWrite<T>(buffer: T[], length: Int? = nil) -> Bool {
    if !isValid {
      assert(isValid, "Socket closed, can't do async writes anymore")
      return false
    }
    if closeRequested {
      assert(!closeRequested, "Socket is being shutdown already!")
      return false
    }
    
