how to read some in vibe.d tcpconnection?

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 6 01:51:53 PST 2015


On 6/03/2015 10:30 p.m., zhmt wrote:
> I am forwarding data from client to another server, if the client send
> data to server,I want to forward that to another server in time.
>
> So, if the server recieves nothing it will wait, if it receive some data
> , forward them to another server immediately.
>
> I dont think the TCPConnecion.read method works in this scene.
>
> I have read the document of TCPConnection, found nothing helpful.
>
> Will somebody help me?

Take a look at empty and leastSize.

https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/core/stream.d#L33


More information about the Digitalmars-d-learn mailing list