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-gate0.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 #include <string.h>
3
4 // sunos does not prototype this in stdio.h
5 extern "C" char* getpass (char* prompt);
6
7 int main (int ac, char** av)
8 {
9 // This is an ftp client.
10 // It puts a file at the remote site outside the
11 // nsc firewall. Donot use this outside of NSC.
12 if (ac != 4) {
13 cerr << "USAGE: "
14 << av [0]
15 << " user@hostname localfilepath remotefilepath\n";
16 return 1;
17 }
18
19 ftp f (&cout);
20
21 // establish connection
22 f->connect ("gatekeeper.nsc.com");
23 f->get_response (); // get the connection response
24
25 // set access
26 f->user (av [1]);
27 f->passwd (getpass ("Password: "));
28
29 // get help
30 f->help ();
31
32 // set representation type to image
33 f->rep_type (ftp::rt_image);
34
35 // put a file
36 f->putfile (av [2], av [3]);
37
38 // quit
39 f->quit ();
40 }
41