Skip to content

aboodmufti/FTP-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File transfer system

   This is a client-server file transfer system using Java's Socket API. The server is started on a specific port number (using TCP) and listens for requests. The client is started with the IP address and port number of the server. It sends requests to the server. The server handles the requests and returns replies to the client. The client handles the replies..

Version

     1.2.0

Compiling

  • To compile the server:

    $ javac TCPServer.java 
  • To compile the client:

    $ javac TCPClient.java 

Usage

  • Running

    1. Start the server:

      $ java TCPServer <PORT_NUMBER> 
    2. Connect the client to the server:

      $ java TCPClient <SERVER_IP_ADDRESS> <SERVER_PORT_NUMBER> 
  • Commands

    These Commands can only be used from the client.

    • Print on the client window a listing of the contents of the current directory on the server machine:

      $ client> ls

    • Retrieve a remote file on the server and store it on the client machine. It is given the same name it has on the server machine:

      $ client> get <SERVER_FILE_NAME>

    • Put and store the file from the client machine to the server machine. On the server, it is given the same name it has on the client machine:

      $ client> put <CLIENT_FILE_NAME>

    • Change the directory on the server:

      $ client> cd <DIRECTORY_NAME>

    • Create a new sub-directory named DIRECTORY_NAME on the server:

      $ client> mkdir <DIRECTORY_NAME>

    • Print on the client window the current directory on the server:

      $ client> pwd

    • Shutdown the client process:

      $ client> .exit

Author

     Abdulrahman Mufti

Website

     www.aboodmufti.com

License

     MIT

About

File Transfer System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages