vibe.d beta banner
get vibe.d
0.7.30

Function ConnectionStream.waitForData

Blocks until data becomes available for read.

The maximum wait time can be customized with the timeout parameter. If there is already data availabe for read, or if the connection is closed, the function will return immediately without blocking.

Prototype

abstract bool waitForData(
  core.time.Duration timeout = max()
);

Parameters

NameDescription
timeout Optional timeout, the default value of Duration.max indicates an infinite timeout

Returns

The function will return true if data becomes available before the timeout is reached. If the connection gets closed, or the timeout gets reached, false is returned instead.

block ddox.authorsblock ddox.copyrightblock ddox.license
Authors
Copyright
License