diff options
Diffstat (limited to 'vio/viopipe.c')
-rw-r--r-- | vio/viopipe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vio/viopipe.c b/vio/viopipe.c index 84643935c13..5007599aa17 100644 --- a/vio/viopipe.c +++ b/vio/viopipe.c @@ -141,5 +141,11 @@ int vio_close_pipe(Vio *vio) DBUG_RETURN(ret); } +/* return number of bytes readable from pipe.*/ +uint vio_pending_pipe(Vio *vio) +{ + DWORD bytes; + return PeekNamedPipe(vio->hPipe, NULL, 0, NULL, &bytes, NULL) ? bytes : 0; +} #endif |