The message type of this packet. This should be one of the values exported by Net::SSH::Perl::Constants from the msg tag; for example, SSH_MSG_NONE.
A Net::SSH::Perl::Buffer object containing the data in this packet. Realistically, there arent many times youll need to supply this argument: when sending a packet, it will be created automatically; and when receiving a packet, the read method (see below) will create the buffer automatically, as well.
Reads a packet from the ssh daemon and returns that packet.
This method will block until an entire packet has been read. The socket itself is non-blocking, but the method waits (using select) for data on the incoming socket, then processes that data when it comes in. If the data makes up a complete packet, the packet is returned to the caller. Otherwise read continues to try to read more data.
Checks the data thats been read from the sshd to see if that data comprises a complete packet. If so, that packet is returned. If not, returns undef.
This method does not block.
Net::SSH::Perl::Packet->read_expect($ssh, CW$type)Reads the next packet from the daemon and dies if the packet type does not match $type. Otherwise returns the read packet.
CW$packet->send([ CW$data ])Sends a packet to the ssh daemon. $data is optional, and if supplied specifies the buffer to be sent in the packet (should be a Net::SSH::Perl::Buffer object). In addition, $data, if specified, must include the packed message type.
If $data is not specified, send sends the buffer internal to the packet, which youve presumably filled by calling the put_* methods (see below).
CW$packet->typeReturns the message type of the packet $packet.
CW$packet->dataReturns the message buffer from the packet $packet; a Net::SSH::Perl::Buffer object.
Calling methods from the Net::SSH::Perl::Buffer class on your Net::SSH::Perl::Packet object will automatically invoke those methods on the buffer object internal to your packet object (which is created when your object is constructed). For example, if you executed the following code:
my $packet = Net::SSH::Perl::Packet->new($ssh, type => SSH_CMSG_USER); $packet->put_str($user);
this would construct a new packet object $packet, then fill its internal buffer by calling the put_str method on it.
Please see the Net::SSH::Perl manpage for author, copyright, and license information.
|perl v5.20.3||NET::SSH::PERL::PACKET (3)||2015-09-12|