1Net::FTP::dataconn(3) User Contributed Perl DocumentationNet::FTP::dataconn(3)
2
3
4
6 Net::FTP::dataconn - FTP Client data connection class
7
9 # Perform IO operations on an FTP client data connection object:
10
11 $num_bytes_read = $obj->read($buffer, $size);
12 $num_bytes_read = $obj->read($buffer, $size, $timeout);
13
14 $num_bytes_written = $obj->write($buffer, $size);
15 $num_bytes_written = $obj->write($buffer, $size, $timeout);
16
17 $num_bytes_read_so_far = $obj->bytes_read();
18
19 $obj->abort();
20
21 $closed_successfully = $obj->close();
22
24 Some of the methods defined in "Net::FTP" return an object which will
25 be derived from this class. The dataconn class itself is derived from
26 the "IO::Socket::INET" class, so any normal IO operations can be
27 performed. However the following methods are defined in the dataconn
28 class and IO should be performed using these.
29
30 "read($buffer, $size[, $timeout])"
31 Read $size bytes of data from the server and place it into $buffer,
32 also performing any <CRLF> translation necessary. $timeout is
33 optional, if not given, the timeout value from the command
34 connection will be used.
35
36 Returns the number of bytes read before any <CRLF> translation.
37
38 "write($buffer, $size[, $timeout])"
39 Write $size bytes of data from $buffer to the server, also
40 performing any <CRLF> translation necessary. $timeout is optional,
41 if not given, the timeout value from the command connection will be
42 used.
43
44 Returns the number of bytes written before any <CRLF> translation.
45
46 "bytes_read()"
47 Returns the number of bytes read so far.
48
49 "abort()"
50 Abort the current data transfer.
51
52 "close()"
53 Close the data connection and get a response from the FTP server.
54 Returns true if the connection was closed successfully and the
55 first digit of the response from the server was a '2'.
56
58 None.
59
61 None.
62
64 Graham Barr <gbarr@pobox.com <mailto:gbarr@pobox.com>>.
65
66 Steve Hay <shay@cpan.org <mailto:shay@cpan.org>> is now maintaining
67 libnet as of version 1.22_02.
68
70 Copyright (C) 1997-2010 Graham Barr. All rights reserved.
71
72 Copyright (C) 2013-2014, 2020 Steve Hay. All rights reserved.
73
75 This module is free software; you can redistribute it and/or modify it
76 under the same terms as Perl itself, i.e. under the terms of either the
77 GNU General Public License or the Artistic License, as specified in the
78 LICENCE file.
79
81 Version 3.13
82
84 23 Dec 2020
85
87 See the Changes file.
88
89
90
91perl v5.34.0 2022-01-21 Net::FTP::dataconn(3)