HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulesocket-0.8.3.0Haskell2010

System.Socket.Type.Stream

  • 1 type
  • 4 values
  • Packagesocket-0.8.3.0
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceStream.hsc

Stream

1 declaration
datadata Stream
#
Instances1Type
  • Type StreamDefined in socket-0.8.3.0 · System.Socket.Type.Stream

Specialized send operations

sendAll

sendAllLazy

sendAllBuilder

Sends a whole Builder without allocating ByteStrings. If performance is an issue, this operation should be preferred over all other solutions for sending stream data.

The operation allocates a single buffer of the given size on entry and reuses this buffer until the whole Builder has been sent. The count of all bytes sent is returned as there is no other efficient way to determine a Builders size without actually building it.

Specialized receive operations

receiveAll

Deprecated. Semantics will change in the next major release. Don't use it anymore!

Like receive, but operates on lazy ByteStrings and continues until either an empty part has been received (peer closed the connection) or given buffer limit has been exceeded or an exception occured.

  • The Int64 parameter is a soft limit on how many bytes to receive. Collection is stopped if the limit has been exceeded. The result might be up to one internal buffer size longer than the given limit. If the returned ByteStrings length is lower than or equal to the limit, the data has not been truncated and the transmission is complete.