ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/socket++-1.10/test/tcftp.C
Revision: 1.2
Committed: Mon Jun 10 14:10:44 2002 UTC (22 years, 4 months ago) by tdb
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Tidy up of files. These are all old things that are not only no longer used
but are also probably useless to anyone other than us. This saves checking
them out all the time, and makes the "cms/source" tree contain only current
stuff. They'll still exist in the attic's though :)

File Contents

# Content
1 #include <ftp.h>
2
3 // sunos does not prototype this in stdio.h
4 extern "C" char* getpass (char* prompt);
5
6 int main (int ac, char** av)
7 {
8 // this is an ftp client
9 // It retrieves the file from the host
10 if (ac != 4) {
11 cerr << "USAGE: " << av [0] << " hostname user filename\n";
12 return 1;
13 }
14
15 ftp f (&cout);
16
17 // establish connection
18 f->connect (av [1]);
19 f->get_response (); // get the connection response
20
21 // set access
22 f->user (av [2]);
23 f->passwd (getpass ("passwd: "));
24
25 // get help
26 f->help ();
27
28 // set representation type to image
29 f->rep_type (ftp::rt_image);
30
31 // list the home directory
32 f->list ();
33
34 // quit
35 f->quit ();
36 }
37