Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::ssh2::channel(3pm) [debian man page]

Net::SSH2::Channel(3pm) 				User Contributed Perl Documentation				   Net::SSH2::Channel(3pm)

NAME
Net::SSH2::Channel - SSH 2 channel object DESCRIPTION
A channel object is created by the Net::SSH2 "channel" method. As well as being an object, it is also a tied filehandle. The Net::SSH2 "poll" method can be used to check for read/write availability and other conditions. setenv ( key, value ... ) Sets remote environment variables. Note that most implementations do not allow environment variables to be freely set. Pass in a list of keys and values with the values to set. Returns the number of successful sets. blocking ( flag ) Enable or disable blocking. Note that this is currently implemented in libssh2 by setting a per-session flag; it's equivalent to Net::SSH2::blocking. eof Returns true if the remote server sent an EOF. send_eof Send an EOF to the remote. After an EOF has been sent, no more data may be sent; the connection should be closed. close Close the channel (happens automatically on object destruction). wait_closed Wait for a remote close event. Must have already seen remote EOF. exit_status Returns the channel's program exit status. pty ( terminal [, modes [, width [, height ]]] ) Request a terminal on a channel. If provided, "width" and "height" are the width and height in characters (defaults to 80x24); if negative their absolute values specify width and height in pixels. pty_size ( width, height ) Request a terminal size change on a channel. "width" and "height" are the width and height in characters; if negative their absolute values specify width and height in pixels. process ( request, message ) Start a process on the channel. See also shell, exec, subsystem. shell Start a shell on the remote host; calls process("shell"). exec ( command ) Execute the command on the remote host; calls process("exec", command). Note that only one of these requests can succeed per channel (cp. "exec" in perlfunc); if you want to run a series of commands, consider using shell instead. subsystem ( name ) Run subsystem on the remote host; calls process("subsystem", command). ext_data ( mode ) Set extended data handling mode: normal (default) Keep data in separate channels; stderr is read separately. ignore Ignore all extended data. merge Merge into the regular channel. read ( buffer, size [, ext ] ) Attempts to read size bytes into the buffer. Returns number of bytes read, undef on failure. If ext is present and set, reads from the extended data channel (stderr). write ( buffer [, ext ] ) Attempts to write the buffer to the channel. Returns number of bytes written, undef on failure. If ext is present and set, writes to the extended data channel (stderr). flush ( [ ext ] ) Flushes the channel; if ext is present and set, flushes extended data channel. Returns number of bytes flushed, undef on error. exit_signal Returns the exit signal of the command executed on the channel. Requires libssh 1.2.8 or higher. SEE ALSO
Net::SSH2. AUTHOR
David B. Robins, <dbrobins@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2005, 2006 by David B. Robins; all rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2011-05-07 Net::SSH2::Channel(3pm)

Check Out this Related Man Page

close(n)						       Tcl Built-In Commands							  close(n)

__________________________________________________________________________________________________________________________________________________

NAME
close - Close an open channel. SYNOPSIS
close channelId _________________________________________________________________ DESCRIPTION
Closes the channel given by channelId. ChannelId must be an identifier for an open channel such as a Tcl standard channel (stdin, stdout, or stderr), the return value from an | invocation of open or socket, or the result of a channel creation command provided by a Tcl extension. All buffered output is flushed to the channel's output device, any buffered input is discarded, the underlying file or device is closed, and channelId becomes unavailable for use. If the channel is blocking, the command does not return until all output is flushed. If the channel is nonblocking and there is unflushed | output, the channel remains open and the command returns immediately; output will be flushed in the background and the channel will be | closed when all the flushing is complete. If channelId is a blocking channel for a command pipeline then close waits for the child processes to complete. If the channel is shared between interpreters, then close makes channelId unavailable in the invoking interpreter but has no other effect | until all of the sharing interpreters have closed the channel. When the last interpreter in which the channel is registered invokes close, | the cleanup actions described above occur. See the interp command for a description of channel sharing. | Channels are automatically closed when an interpreter is destroyed and when the process exits. Channels are switched to blocking mode, to | ensure that all output is correctly flushed before the process exits. The command returns an empty string, and may generate an error if an error occurs while flushing output. SEE ALSO
file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3) KEYWORDS
blocking, channel, close, nonblocking Tcl 7.5 close(n)
Man Page