{"id":21064534,"url":"https://github.com/tawfik-s/socket-programming-java","last_synced_at":"2025-03-14T01:30:21.808Z","repository":{"id":122989265,"uuid":"607060027","full_name":"tawfik-s/socket-programming-java","owner":"tawfik-s","description":"socket programming with java playground","archived":false,"fork":false,"pushed_at":"2023-04-15T09:17:18.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T17:58:59.565Z","etag":null,"topics":["java","java-networking","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/tawfik-s.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-02-27T08:21:01.000Z","updated_at":"2024-01-10T13:59:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d50ef51-9513-4a58-a539-36d7fe41b794","html_url":"https://github.com/tawfik-s/socket-programming-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fsocket-programming-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fsocket-programming-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fsocket-programming-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawfik-s%2Fsocket-programming-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tawfik-s","download_url":"https://codeload.github.com/tawfik-s/socket-programming-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234856240,"owners_count":18897402,"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","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","java-networking","tcp-socket","udp-socket"],"created_at":"2024-11-19T17:49:54.919Z","updated_at":"2025-01-20T20:51:32.188Z","avatar_url":"https://github.com/tawfik-s.png","language":"Java","readme":"# socket-programming-java\nsocket programming with java playground\n\n## what is socket?\nSockets provide an interface for programming networks at the transport layer\nNetwork communication using Sockets is very much similar to performing file I/O\nIn fact, socket handle is treated like file handle.\nThe data streams used in file I/O operation are also applicable to socket-based I/O\nSocket-based communication is programming language independent.\nThis means, a socket program written in Java language can also communicate to a program written in Java or non-Java socket program\nSocket  = IP address + Port number\n\n## How socket works?\nA server program runs on a specific computer and has a socket\nthat is bound to a specific port. The software\nserver waits and listens to the socket for a\nclient program to make a connection request.\n\n\n![img.png](images/img.png)\n\nIf everything goes well, the server accepts the connection.\nUpon acceptance, the server gets a new socket bounds\nto a different port. \nIt needs a new socket (consequently a different port number) so that it can continue to listen to the original socket\nfor other connection requests while serving the\nconnected client.\n\n![img_1.png](images/img_1.png)\n\nJava’s .net package provides two classes:\n- `Socket` for implementing a client\n- `ServerSocket` – for implementing a server\n\n\u003chr\u003e\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawfik-s%2Fsocket-programming-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftawfik-s%2Fsocket-programming-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawfik-s%2Fsocket-programming-java/lists"}