Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
117707
Status:
rejected
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
mc08990 [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Net::SSH2 ->close on sftp or file?
Date: Fri, 9 Sep 2016 14:38:45 -0400
To: bug-Net-SSH2@rt.cpan.org
From: Michael Carey <mc08990@gmail.com>

Hello,

 

In the examples for libssh2, after a remote file is open and the IO loop is finished there is a call to libssh_sftp_close() and then libssh_sftp_shutdown().  This is at least syntactically analogous to local file IO where a file is closed at the end.


https://www.libssh2.org/examples/sftp_write.html


Questions:  Where are these functions accessible in Net::SSH2?  How can I insure a file I am writing to gets closed if, for instance, I want to go on to do other things with the Net::SSH2 object after writing a remote file?

The file object Net::SSH2::File is closed from its DESTROY method. Similarly, Net::SSH2::SFTP object is shutdown from its DESTROY method. BTW, please, don't use the bug tracker for sending questions. Post them in PerlMonks or StackOverflow.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.