Skip to content

j-ordanos/Java-socket-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Socket Programming

This repository is a collection of Java examples and exercises to demonstrate the basics and practical use of socket programming in Java. It includes code samples and explanations for creating both client-server and peer-to-peer network applications using Java's networking libraries.

Features

  • Examples for both TCP and UDP socket communication
  • Simple chat application using sockets
  • File transfer between client and server
  • Handling multiple clients with multithreading
  • Clear, well-documented sample code for learning and experimenting

Getting Started

  1. Clone this repository:

    git clone https://github.com/j-ordanos/Java-socket-programming.git
    cd Java-socket-programming
  2. Compile the Java files:

    javac src/*.java
  3. Run the example programs:

    java src.Server
    java src.Client

    (Replace Server and Client with the actual class names as needed.)

Requirements

  • Java JDK 8 or higher

Examples

  • Echo server and client
  • Multi-client chat server
  • File transfer with sockets
  • UDP datagram exchange

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Learning and demo projects for Java socket programming, including client-server chat.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages