 
 extension StreamResponse {
     private class SocketStream: WriteSocket {
+        func send(_ string: String) throws {
+            guard let data = string.data(using: .utf8) else {
+                throw DataError(kind: .dataCodingError(string: string))
+            }
+            try send(data)
+        }
+
         private static let CRLF = "\r\n".data(using: .utf8)!
         private let socket: Socket
         init(socket: Socket) {

/// Protocol for writing to socket in stream
public protocol WriteSocket {
    func send(_ data: Data) throws
}

/// Response with stream

            sent = false
        }

        func send(_ string: String) throws {
            guard let data = string.data(using: .utf8) else {
                throw DataError(kind: .dataCodingError(string: string))
            }
            try send(data)
        }

        func send(_ data: Data) throws {
            guard !sent else {
                currentIndex += data.count
