This repository contains Java programs demonstrating various networking concepts, including server-client communication and file transfer, implemented using sockets.
-
Server and Client: Basic server-client communication where the client sends a message to the server and receives a response.
-
Server2 and Client2: Enhanced server-client interaction where both the server and client can send and receive messages continuously.
-
File Server and File Client: Implementation of file transfer between a server and client, where the client can request a file from the server and receive its content.
- Compile the Java files using any Java compiler.
- Start the server by running the server programs (
Server.java
,Server2.java
, orFileServer.java
). - Run the client programs (
Client.java
,Client2.java
, orFileClient.java
) to interact with the server. - Follow the prompts or command-line instructions to send messages or transfer files between the server and client.
- Java Development Kit (JDK) installed on the system.
# Start the server
java Server
# Run the client
java Client
Contributions are welcome! Feel free to open issues or pull requests for any improvements or additional features.