{"id":38956242,"url":"https://github.com/levelrin/jws-server","last_synced_at":"2026-01-17T16:17:07.422Z","repository":{"id":46389148,"uuid":"315093066","full_name":"levelrin/jws-server","owner":"levelrin","description":"A framework for WebSocket server in Java","archived":false,"fork":false,"pushed_at":"2021-10-17T20:08:10.000Z","size":274,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T18:35:36.412Z","etag":null,"topics":["java","websocket","websockets"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levelrin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T17:25:37.000Z","updated_at":"2021-10-18T06:39:49.000Z","dependencies_parsed_at":"2022-09-17T13:25:13.671Z","dependency_job_id":null,"html_url":"https://github.com/levelrin/jws-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/levelrin/jws-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fjws-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fjws-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fjws-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fjws-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levelrin","download_url":"https://codeload.github.com/levelrin/jws-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levelrin%2Fjws-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","websocket","websockets"],"created_at":"2026-01-17T16:17:07.013Z","updated_at":"2026-01-17T16:17:07.409Z","avatar_url":"https://github.com/levelrin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/levelrin/jws-server.svg?style=svg)](https://circleci.com/gh/levelrin/jws-server)\n[![Test Coverage](https://img.shields.io/codecov/c/github/levelrin/jws-server.svg)](https://codecov.io/github/levelrin/jws-server?branch=main)\n[![Maven Central](https://img.shields.io/maven-central/v/com.levelrin/jws-server.svg)](https://maven-badges.herokuapp.com/maven-central/com.levelrin/jws-server)\n[![](https://tokei.rs/b1/github/levelrin/jws-server?category=code)](https://github.com/levelrin/jws-server)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/levelrin/jws-server/blob/main/LICENSE)\n\n# jws-server\n\njws stands for Java WebSocket.\nIt is a Java library for building a WebSocket server.\nIt supports [rfc6455](https://datatracker.ietf.org/doc/html/rfc6455).\n\n## Quick Start\n\nPut the code below on your main method.\n\n```java\nnew JwsGuide()\n    .defaultServerThread()\n    // default port is 42069 ;)\n    .defaultPort()\n    .defaultSocketThread()\n    .skipHostValidation()\n    .ignorePong()\n    .reaction(\n        // You should create your class that implements Reaction interface.\n        new Reaction() {\n            @Override\n            public String endpoint() {\n                // This reaction belongs to the '/yoi' endpoint.\n                return \"/yoi\";\n            }\n            \n            @Override\n            public void onStart(final Session session) {\n                // This method will be called\n                // when WebSocket communication starts.\n            }\n            \n            @Override\n            public void onMessage(final Session session, final String message) {\n                // This method will be called\n                // when you receive a text message from the client.\n                session.sendMessage(\"A message (reply) to the client.\");\n            }\n            \n            @Override\n            public void onMessage(final Session session, final byte[] message) {\n                // This method will be called\n                // when you receive a message from the client in bytes.\n            }\n            \n            @Override\n            public void onClose(final Session session, final int code, final String reason) {\n                // This method will be called\n                // when WebSocket communication is about to be closed\n                // for that session.\n            }\n        }\n    ).reaction(\n        // You can have multiple reactions like this.\n        new MoreReaction()\n    ).ready().go();\n```\n\nConnect to your server like this (JavaScript):\n```javascript\nconst socket = new WebSocket('ws://localhost:42069/yoi');\n```\n\n## Dependency\n\nYou just need to add the dependency like so:\n\nGradle:\n```groovy\ndependencies {\n    implementation 'com.levelrin:jws-server:0.1.0'\n}\n```\n\nMaven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.levelrin\u003c/groupId\u003e\n  \u003cartifactId\u003ejws-server\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nRequirements:\n1. JDK 1.15+\n\n## How to contribute?\n\n1. Create a [ticket](https://github.com/levelrin/jws-server/issues).\n2. Send a [pull request](https://github.com/levelrin/jws-server/pulls).\nBefore you do that, run `./gradlew build` and make sure the build is clean.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevelrin%2Fjws-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevelrin%2Fjws-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevelrin%2Fjws-server/lists"}