[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4095":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":28,"discoverSource":29},4095,"Java-WebSocket","TooTallNate\u002FJava-WebSocket","TooTallNate","A barebones WebSocket client and server implementation written in 100% Java.","http:\u002F\u002Ftootallnate.github.io\u002FJava-WebSocket",null,"Java",10809,2586,373,42,0,2,12,45,"MIT License",false,"master",true,[],"2026-06-12 02:00:58","Java WebSockets\n===============\n[![Javadocs](https:\u002F\u002Fwww.javadoc.io\u002Fbadge\u002Forg.java-websocket\u002FJava-WebSocket.svg)](https:\u002F\u002Fwww.javadoc.io\u002Fdoc\u002Forg.java-websocket\u002FJava-WebSocket)\n[![Maven Central](https:\u002F\u002Fimg.shields.io\u002Fmaven-central\u002Fv\u002Forg.java-websocket\u002FJava-WebSocket.svg)](https:\u002F\u002Fmvnrepository.com\u002Fartifact\u002Forg.java-websocket\u002FJava-WebSocket)\n\nThis repository contains a barebones WebSocket server and client implementation\nwritten in 100% Java. The underlying classes are implemented `java.nio`, which allows for a\nnon-blocking event-driven model (similar to the\n[WebSocket API](https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fweb-sockets.html) for web browsers).\n\nImplemented WebSocket protocol versions are:\n\n * [RFC 6455](http:\u002F\u002Ftools.ietf.org\u002Fhtml\u002Frfc6455)\n * [RFC 7692](http:\u002F\u002Ftools.ietf.org\u002Fhtml\u002Frfc7692)\n\n[Here](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Fwiki\u002FDrafts) some more details about protocol versions\u002Fdrafts.\n[PerMessageDeflateExample](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Fwiki\u002FPerMessageDeflateExample) enable the extension with reference to both a server and client example.\n\n\n## Getting Started\n\n### Dependency management tools\n\nBelow is a brief guide to using dependency management tools like maven or gradle.\n\n#### Maven\nTo use maven add this dependency to your pom.xml:\n```xml\n\u003Cdependency>\n  \u003CgroupId>org.java-websocket\u003C\u002FgroupId>\n  \u003CartifactId>Java-WebSocket\u003C\u002FartifactId>\n  \u003Cversion>1.6.0\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n#### Gradle\nTo use Gradle add the maven central repository to your repositories list:\n```xml\nmavenCentral()\n```\nThen you can just add the latest version to your build.\n```xml\ncompile \"org.java-websocket:Java-WebSocket:1.6.0\"\n```\nOr this option if you use gradle 7.0 and above.\n```xml\nimplementation 'org.java-websocket:Java-WebSocket:1.6.0'\n```\n\n#### Logging\n\nThis library uses [SLF4J](https:\u002F\u002Fwww.slf4j.org\u002F) for logging and does not ship with any default logging implementation.\n\nExceptions are using the log level `ERROR` and debug logging will be done with log level `TRACE`.\n\nFeel free to use whichever logging framework you desire and use the corresponding [binding](https:\u002F\u002Fmvnrepository.com\u002Fartifact\u002Forg.slf4j) in your dependency management.\n\nIf you want to get started, take a look at the SimpleLogger [example](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Fwiki\u002FSimpleLogger-example).\n\n### Standalone jar\n\nIf you do not use any dependency management tool, you can find the latest standalone jar [here](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Freleases\u002Flatest).\n\nWriting your own WebSocket Server\n---------------------------------\n\nThe `org.java_websocket.server.WebSocketServer` abstract class implements the\nserver-side of the\n[WebSocket Protocol](http:\u002F\u002Fwww.whatwg.org\u002Fspecs\u002Fweb-socket-protocol\u002F).\nA WebSocket server by itself doesn't do anything except establish socket\nconnections though HTTP. After that it's up to **your** subclass to add purpose.\n\nAn example for a WebSocketServer can be found in both the [wiki](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Fwiki#server-example) and the [example](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Ftree\u002Fmaster\u002Fsrc\u002Fmain\u002Fexample) folder.\n\nWriting your own WebSocket Client\n---------------------------------\n\nThe `org.java_websocket.client.WebSocketClient` abstract class can connect to\nvalid WebSocket servers. The constructor expects a valid `ws:\u002F\u002F` URI to\nconnect to. Important events `onOpen`, `onClose`, `onMessage` and `onError`\nget fired throughout the life of the WebSocketClient, and must be implemented\nin **your** subclass.\n\nAn example for a WebSocketClient can be found in both the [wiki](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Fwiki#client-example) and the [example](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Ftree\u002Fmaster\u002Fsrc\u002Fmain\u002Fexample) folder.\n\nExamples\n-------------------\n\nYou can find a lot of examples [here](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Ftree\u002Fmaster\u002Fsrc\u002Fmain\u002Fexample).\n\nWSS Support\n---------------------------------\nThis library supports wss.\nTo see how to use wss please take a look at the examples.\u003Cbr>\n\nIf you do not have a valid **certificate** in place then you will have to create a self signed one.\nBrowsers will simply refuse the connection in case of a bad certificate and will not ask the user to accept it.\nSo the first step will be to make a browser to accept your self signed certificate. ( https:\u002F\u002Fbugzilla.mozilla.org\u002Fshow_bug.cgi?id=594502 ).\u003Cbr>\nIf the websocket server url is `wss:\u002F\u002Flocalhost:8000` visit the url `https:\u002F\u002Flocalhost:8000` with your browser. The browser will recognize the handshake and allow you to accept the certificate.\n\nThe vm option `-Djavax.net.debug=all` can help to find out if there is a problem with the certificate.\n\nIt is currently not possible to accept ws and wss connections at the same time via the same websocket server instance.\n\nFor some reason Firefox does not allow multiple connections to the same wss server if the server uses a different port than the default port (443).\n\nIf you want to use `wss` on the android platform you should take a look at [this](https:\u002F\u002Fgithub.com\u002FTooTallNate\u002FJava-WebSocket\u002Fwiki\u002FFAQ:-Secure-WebSockets#wss-on-android).\n\nI ( @Davidiusdadi ) would be glad if you would give some feedback whether wss is working fine for you or not.\n\nMinimum Required JDK\n--------------------\n\n`Java-WebSocket` is known to work with:\n\n * Java 8 and higher\n\nOther JRE implementations may work as well, but haven't been tested.\n\nLicense\n-------\n\nEverything found in this repo is licensed under an MIT license. See\nthe `LICENSE` file for specifics.\n","TooTallNate\u002FJava-WebSocket 是一个完全使用 Java 编写的轻量级 WebSocket 客户端和服务器实现。该项目支持 RFC 6455 和 RFC 7692 协议版本，基于 `java.nio` 实现了非阻塞事件驱动模型，适用于需要实时通信的应用场景。其核心功能包括简易的 WebSocket 服务器与客户端搭建，支持消息压缩扩展，并且通过 SLF4J 提供灵活的日志记录选项。此库适合于需要在纯 Java 环境下快速集成 WebSocket 功能的开发者，特别适用于构建聊天应用、在线游戏或任何需要低延迟交互的服务。借助 Maven 或 Gradle 可以轻松将其添加到项目中。","2026-06-11 02:58:25","top_language"]