@@ -44,16 +44,15 @@ import Network.Socket (fdSocket)
4444-- | Default action value for 'Connection'.
4545socketConnection :: Socket -> IO Connection
4646socketConnection s = do
47− rbuf <- allocateBuffer bytesPerRead
48− wbuf <- allocateBuffer bytesPerWrite
49− wBlazeBuf <- toBlazeBuffer wbuf bytesPerWrite
47+ buf <- allocateBuffer bufferSize
48+ blazeBuf <- toBlazeBuffer buf bufferSize
5049 return Connection {
5150 connSendMany = Sock.sendMany s
5251 , connSendAll = Sock.sendAll s
5352 , connSendFile = defaultSendFile s
54− , connClose = sClose s >> freeBuffer rbuf >> freeBuffer wbuf
55− , connRecv = receive s rbuf bytesPerRead
56− , connWriteBuffer = wBlazeBuf
53+ , connClose = sClose s >> freeBuffer buf
54+ , connRecv = receive s buf bufferSize
55+ , connBuffer = blazeBuf
5756 , connSendFileOverride = Override s
5857 }
5958