www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: When does read block?

Re: When does read block?

From: Seth Willits <seth_at_freaksw.com>
Date: Thu, 17 May 2012 11:30:42 -0700

On May 17, 2012, at 11:01 AM, Peter Stuge wrote:

>> And a quick note, the documentation says for libssh2_channel_eof:
>> "Check if the remote host has sent an EOF status for the selected
>> stream." What selected stream?
>
> The channel you pass as parameter. Please send commits to improve the
> documentation.

A quick search through the RFCs and they mostly use "channels" though in a few spots "streams (channels)". There are no references to substreams, and "stream" seems to be used generically. It'd take me a long time to read through everything.

In my head already, a session has multiple channels and a channel has multiple streams. But it seems that more properly a channel is a stream, and stdout/stderr/the other "extended data streams" are actually "substreams" to libssh2, though it uses "stream_id" as a parameter for both read and write. So really, libssh2 is effectively referring to both channels and stdout/err/etc as streams, and stdout/err/etc as both streams and substreams. Whatever terms are chosen, using them consistently _everywhere_ would be nice.

--
Seth Willits
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-05-17

the libssh2 team