Skip to content

A file transfer application built using Java Socket Programming. It allows the client to download and upload files to a server using a GUI built with Java AWT and SWING.

mansimarkaur/TCP-file-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TCP-File-Transfer

This is a Java application that :

  • uses TCP for file transfer.

  • has a user interface buit using Java AWT and Java Swing.

  • is built using Java Socket Programming.

  • allows multiple users to connect to a server at once. It accomplishes this through multithreading.

  • mandates the server to specify working directory as a command line argument with the freedom to specify a custom port number as the second argument. The default port number has been set to 3333.

  • server assigns connection IDs to the clients connected.

  • mandates client to specify working directory as a command line argument. It allows user to specify host address and if not specified, defaults it to Localhost. The user can also specify the port number as the third argument.

  • Displays files and directories present in the server working directory and allows the client to select files and download them onto the client system.

  • Allows the client to upload files to the server working directory. This allows 2 clients to transfer files through the server.

  • You may call it ShareIt, Xender or something similar for laptops and PCs 😉

Getting Started

git clone https://github.com/mansimarkaur/TCP-file-transfer
cd TCP-file-transfer

For server :

javac TCPServer.java
java TCPServer <server directory name>

For client :

javac TCPClient.java
java TCPClient <client directory name> 

Enter file name and click on upload. ⬆️

Choose file to be downloaded from the panel and click on download. ⬇️

Server and Client can interact only through the same port number

Prerequisites

If you do not have Java installed, refer to this Java installation guide

For newbies, remember to set path variables in Windows and OSX

About

A file transfer application built using Java Socket Programming. It allows the client to download and upload files to a server using a GUI built with Java AWT and SWING.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages