{"id":20609111,"url":"https://github.com/tanuiniko/network-programming-java","last_synced_at":"2025-07-22T07:32:22.807Z","repository":{"id":213976060,"uuid":"735380034","full_name":"tanuiniko/Network-Programming-Java","owner":"tanuiniko","description":"Network Programming Concepts in Java. This project includes server programs that echo clients' messages back to them \u0026 to host on Local Machines.","archived":false,"fork":false,"pushed_at":"2024-05-29T09:05:05.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T17:49:32.076Z","etag":null,"topics":["java","multithreading","network-programming","socket-programming","tcp-socket","udp-socket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanuiniko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-24T17:48:50.000Z","updated_at":"2024-05-29T09:05:08.000Z","dependencies_parsed_at":"2024-01-07T10:45:46.794Z","dependency_job_id":"fedeffff-ba04-4cbf-9ee4-33d3d7262b4b","html_url":"https://github.com/tanuiniko/Network-Programming-Java","commit_stats":null,"previous_names":["tanuiniko/networking","tanuiniko/network-programming-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tanuiniko/Network-Programming-Java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanuiniko%2FNetwork-Programming-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanuiniko%2FNetwork-Programming-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanuiniko%2FNetwork-Programming-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanuiniko%2FNetwork-Programming-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanuiniko","download_url":"https://codeload.github.com/tanuiniko/Network-Programming-Java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanuiniko%2FNetwork-Programming-Java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266447833,"owners_count":23930041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","multithreading","network-programming","socket-programming","tcp-socket","udp-socket"],"created_at":"2024-11-16T10:12:45.343Z","updated_at":"2025-07-22T07:32:22.765Z","avatar_url":"https://github.com/tanuiniko.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server Echo Project\n\n## Introduction\n\u003cp\u003eThe most common categories of network software nowadays are clients and servers. A server, as the name \n  implies, provides a service of some kind. This service is provided for clients that connect to the server's\n  host machine specifically for the purpose of accessing the service. Thus, it is the clients that initiate \n  a dialogue with the server.\u003c/p\u003e\n\u003cp\u003eThough a client and its corresponding server will normally run on different machines in a real-world \n  application, it is perfectly possible for such programs to run on the same machine.\u003c/p\u003e\n\n#### Sockets\n\u003cp\u003eFor each port supplying a service, there is a server program waiting for any requests. All such programs run \ntogether in parallel on the host machine. When a client attempts to make connection with a particular server\nprogram, it supplies the port number of the associated service. The host machine examines the port number and \n  passes the client's transmission to the appropriate server program for processing.\u003c/p\u003e\n  \u003cp\u003eIn most applications, of course, there are likely to be multiple clients wanting the same service at \n  the same time. A common example o fthis requirement is that of multiple browsers wanting Web pages from\n   the same server. The server, of course, needs a way of distinguishing between clients and keeping their \n  dialogues separate from each other. This is achieved via the use of sockets.\u003c/p\u003e\n  \u003cp\u003eNOTE: Both ports and sockets are abstract concepts. A Port is a logical connection to a computer and is \n  identified by a number in the range 1-65535. Whereas a socket is used to indicate one of the two ends-points\n    of a communication link between two processes.\u003c/p\u003e\n\n\n## Using Sokets\n\u003cp\u003eJava implements both TCP/IP sockets and datagram sockets (UDP sockets).\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003eTCP Sockets\n  \u003cp\u003eA communication link created via TCP/IP sockets is a connection-orientated link. This means that the \n  connection between server and client remains open throughout the duration of the dialogue between the two and \n  is only broken when one end of the dialogue terminates.\u003c/p\u003e \n  \u003c/li\u003e\n  \u003cli\u003eDatagram (UDP) Sockets\n  \u003cp\u003eUnlike TCP/IP sockets, datagram sockets are connectionless. That is to say, the connection between client \n  and server is not maintained throughout the duration of the dialogue. Instead, each datagram packet is sent \n  as an isolated transmission whenever necessary. (Daragram sockets provide usually faster mean of transmitting\n    data than TCP/IP sockets, but they are unreliable.)\u003c/p\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n## Multithreaded Server\n\n\u003cp\u003eThere is a fundamental and important limitation associated with the server programs we created in \nthis project (not multithreaded, ofcourse):\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003ethey can handle only one connection at a time.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThis restriction is not feasible for most real-world applications and would render the software useless.\nThere are two possible solutions:\u003c/p\u003e\n\u003cui\u003e\n  \u003cli\u003euse a non-blocking server.\u003c/li\u003e\n  \u003cli\u003euse a multithreaded server. (handles multiple connections concurrently)\u003c/li\u003e\n\u003c/ui\u003e\n\n## Abstract\n\u003cp\u003eCreated multi-threaded server applications for echoing client messages and retrieving host IP addresses using Java. Implemented TCP and UDP sockets with thread synchronization for concurrent processing.Improved server response efficiency by implementing optimized locking mechanisms.\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanuiniko%2Fnetwork-programming-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanuiniko%2Fnetwork-programming-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanuiniko%2Fnetwork-programming-java/lists"}