{"id":13482615,"url":"https://github.com/mrniko/netty-socketio","last_synced_at":"2025-05-13T11:08:23.834Z","repository":{"id":2212449,"uuid":"3161748","full_name":"mrniko/netty-socketio","owner":"mrniko","description":"Socket.IO server implemented on Java. Realtime java framework","archived":false,"fork":false,"pushed_at":"2025-03-19T08:43:35.000Z","size":2254,"stargazers_count":6948,"open_issues_count":430,"forks_count":1677,"subscribers_count":393,"default_branch":"master","last_synced_at":"2025-05-13T11:08:16.095Z","etag":null,"topics":["java","netty","polling","socket-io","websocket"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrniko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2012-01-12T11:43:49.000Z","updated_at":"2025-05-13T00:39:38.000Z","dependencies_parsed_at":"2023-07-06T10:32:48.617Z","dependency_job_id":"1e9bbbb8-e732-4859-b788-bf029db896b8","html_url":"https://github.com/mrniko/netty-socketio","commit_stats":{"total_commits":875,"total_committers":78,"mean_commits":"11.217948717948717","dds":"0.43314285714285716","last_synced_commit":"c4ca71e0c91483f8832a58e97f3a25f00f8b97a5"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrniko%2Fnetty-socketio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrniko%2Fnetty-socketio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrniko%2Fnetty-socketio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrniko%2Fnetty-socketio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrniko","download_url":"https://codeload.github.com/mrniko/netty-socketio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929367,"owners_count":21985802,"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","netty","polling","socket-io","websocket"],"created_at":"2024-07-31T17:01:03.771Z","updated_at":"2025-05-13T11:08:23.806Z","avatar_url":"https://github.com/mrniko.png","language":"Java","readme":"Netty-socketio Overview\n===\nThis project is an open-source Java implementation of [Socket.IO](http://socket.io/) server. Based on [Netty](http://netty.io/) server framework.  \n\nLicensed under the Apache License 2.0.\n\n\nFeatures\n================================\n* __1.x - 4.x__ version of [Socket.IO-client](https://github.com/socketio/socket.io) is supported\n* Supports xhr-polling transport  \n* Supports websocket transport  \n* Supports namespaces and rooms  \n* Supports ack (acknowledgment of received data)  \n* Supports SSL  \n* Supports client store ([Redisson](https://redisson.pro), Hazelcast, Memory)  \n* Supports distributed broadcast across netty-socketio nodes ([Redisson](https://redisson.pro), Hazelcast)  \n* Supports OSGi  \n* Supports Spring  \n* Contains Java module info for JPMS. \n* Lock-free and thread-safe implementation  \n* Declarative handler configuration via annotations  \n\nJAR is compatible with Java 8 but needs Java 11+ for building the module-info.\n\n### Maven \n\nInclude the following to your dependency list:\n```xml\n    \u003cdependency\u003e\n     \u003cgroupId\u003ecom.corundumstudio.socketio\u003c/groupId\u003e\n     \u003cartifactId\u003enetty-socketio\u003c/artifactId\u003e\n     \u003cversion\u003e2.0.13\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\nPerformance\n================================\n\nCustomer feedback in __2012__:  \nCentOS, 1 CPU, 4GB RAM runned on VM: \nCPU 10%, Memory 15%  \n6000 xhr-long polling sessions or 15000 websockets sessions  \n4000 messages per second  \n\n\nCustomer feedback in __2014__:  \n\"To stress test the solution we run 30 000 simultaneous websocket clients and managed to peak at total of about 140 000 messages per second with less than 1 second average delay.\" (c) Viktor Endersz - Kambi Sports Solutions\n\nProjects using netty-socketio\n================================\nMultiplayer Orchestra: [multiplayer-orchestra.com](https://multiplayer-orchestra.com/)  \nAVOS Cloud: [avoscloud.com](https://avoscloud.com/)  \nKambi Sports Solutions: [kambi.com](http://kambi.com/)  \nARSnova: [arsnova.eu](https://arsnova.eu)  \n\nRecent Releases\n================================\n#### Please Note: trunk is current development branch.\n\n#### 19-Mar-2025 - version 2.0.13 released\n\nFixed - Socket.IO Client v2 fails to connect (thanks to @penguinlab)  \nFixed - Support for v1 / readNamespace. V1 namespace is without special characters , or ? (thanks to @Pacl0)  \n\n#### 01-Nov-2024 - version 2.0.12 released\n\nFeature - enableCors setting added (thanks to @zd925)  \nFeature - ability to define http request decoder (thanks to @gurkancakir)  \n\nFixed - if ack returns after the timeout trigger ,a IllegalStateException will be thrown (thanks to @malinGH)  \nFixed - prevents the client from repeatedly connecting to the namespace (thanks to @bigtian99)  \nFixed - treat attachments as binary by default (thanks to @nicsor)  \nFixed - recoverable handshake failure handling (thanks to @berinhardt)  \nFixed - HashedWheelTimeoutScheduler should remove scheduledFutures before task execution (thanks to @berinhardt)  \n\n#### 25-Jul-2024 - version 2.0.11 released\n\nFixed - custom namespaces support auth data (thanks to @Addi)  \nFixed - attachments frame buffer reading  \nFixed - memory leak while WebSocketServerHandshakeException or Channel failed (thanks to @h3mant-1)\n\n#### 01-Mar-2024 - version 2.0.9 released\n\nFeature - v3/v4 parsing of multiple messages in one HTTP polling body (thanks to @unverbraucht)\n\nFixed - IllegalReferenceCountException error\n\n#### 24-Jan-2024 - version 2.0.8 released\n\nFixed - possible OOM caused by attachments parsing\n\n#### 23-Jan-2024 - version 2.0.7 released\n\nGithub Actions support made by @liangyuanpeng\n\nFeature - Java module support (thanks to @unverbraucht)  \nFeature - AuthTokenListener added (thanks to @unverbraucht)  \nFeature - multi-packet separator support (thanks to @unverbraucht)  \n\nImprovement - Send Bulk leave event instead of multiple leave events on disconnect (thanks to @ksahu750)  \n\nFixed - NPE during ack response timeout (thanks to @BlueSodaWater)  \nFixed - Resource Leak in readVersion() method (thanks to @JHOANG23)\n\n#### 24-Oct-2023 - version 2.0.6 released\n\nFeature - added availability to add key-value pairs to socket store during authorization (thanks to @shutuper)  \nFeature - getRoomOperations() method with room varargs param (thanks to @shutuper)  \n\n#### 01-Jul-2023 - version 2.0.3 released\nFixed - client can't connect to non-default namespace (thanks to @lyjnew)\n\n#### 17-May-2023 - version 2.0.2 released\nFixed - NPE in WebSocketTransport and PollingTransport (thanks to @Hunterk95)\n\n#### 14-May-2023 - version 2.0.1 released \nJDK 8 is minimum version required for usage. \n\nFixed - message larger than maxFramePayloadLength causes memory leak  \n\n#### 14-May-2023 - version 2.0.0 released \nFeature - SocketIO 4.x protocol support (thanks to @HashZhang)  \n\nFixed - add all the socketio specific classes to bundles (thanks to @rishabhgup)  \n\n#### 17-Apr-2023 - version 1.7.25 released  \nFixed - io.netty.channel.ChannelPipelineException error\n\n#### 14-Apr-2023 - version 1.7.24 released  \nFeature - SocketIOClient.isWritable() method added (thanks @xuwenqing04)  \nFeature - Namespace.addListeners(Iterable\u003cL\u003e listeners) method added (thanks @damonxue)  \n\nFixed - disconnect event packet should be a subtype of MESSAGE (thanks @MasterShi)  \nFixed - BaseStoreFactory throws NPE  \n\n#### 02-Feb-2023 - version 1.7.23 released  \nFeature - Added support for bulk join and leave (thanks @ksahu750)\n\nFixed - auto disconnected (regression since 1.7.22)\n\n#### 22-Sep-2022 - version 1.7.22 released  \nFeature - ping/pong support for socketio v4 protocol (thanks to @HashZhang)\n\n#### 06-Aug-2022 - version 1.7.21 released  \nFixed - transport name should be checked in uppercase (regression since 1.7.20)\n\n#### 26-Jul-2022 - version 1.7.20 released  \nFeature - needClientAuth setting added (thanks to @huws)\n\nFixed - ContinuationWebSocketFrame should be used if payload \u003e maxFramePayloadLength (thanks to 俞伟搏)  \nFixed - event listener src class and dest bean is no match (thanks to @cifaz)  \nFixed - illegal transport parameter (thanks to @mirus36)  \n\n#### 29-Apr-2021 - version 1.7.19 released  \nFeature - writeBufferWaterMarkLow and writeBufferWaterMarkHigh settings added (thanks to @xuminwlt)  \nFeature - allowHeaders setting added (thanks to @HuangHuan)  \nFeature - getCurrentRoomSize() method added (thanks to @sunxiaoyu3)  \n\nFixed - namespace bug (thanks to @@johntyty912)  \nFixed - multiple nodes with redisson receive same message (thanks to 梁嘉祺)  \nFixed - multiple nodes receive only one LEAVE msg on client disconnect (thanks to @GaryLeung922)  \n\n#### 17-Jan-2020 - version 1.7.18 released  \nFeature - support for event interceptors which catch all events (thanks to @yosiat)  \nFixed - namespace event broadcasting (thanks to Volodymyr Masliy)  \n\n#### 11-Jan-2019 - version 1.7.17 released  \nFeature - randomSession setting added to Config object (thanks to @yuanxiangz)  \nFixed - NPE in WebSocketTransport  \nFixed - NPE \u0026 memory leak (thanks to zhaolianwang)  \nFixed - namespace parsing (thanks to Redliver)  \nFixed - Redisson 3.9+ compatibility  \n\n#### 06-Jul-2018 - version 1.7.16 released  \nFixed - non thread-safe ACK handling (thanks to @dawnbreaks)  \nFixed - inactive long-polling channels cause memory leak (thanks to @dawnbreaks)  \nFixed - websocket CloseFrame processing (thanks to @hangsu.cho)  \nFixed - WebSocketTransport NPE  \n\n#### 15-May-2018 - version 1.7.15 released  \n\nFixed - Session ID is not unique anymore  \nFixed - fixed underlying connection not closing on ping timeout  \nFixed - the \"fin_close\" problem  \n\n#### 26-Feb-2018 - version 1.7.14 released  \nFeature - added local socket address for the connection (thanks to @SergeyGrigorev)  \nFeature - `addPingListener` method added (thanks to @lovebing)  \nFeature - add ThreadFactory for HashedWheelTimer (thanks to @hand515)  \nFixed - changed SO_LINGER to be handled as child channel (not server channel) option (thanks to @robymus)  \nFixed - ByteBuf leak if binary attachments are used  \nFixed - restore session from Cookie (thanks to @wuxudong)  \nFixed - NumberFormatException when b64 is bool value (thanks to @vonway)  \nFixed - data encoding for polling transport  \n\n#### 20-Sep-2017 - version 1.7.13 released  \nFeature - Added option to change the SSL KeyFactoryAlgorithm using Configuration (thanks to @robymus)  \nImprovement - Binary ack handling improvements (thanks to Sergey Bushik)  \nFixed - Failed to mark a promise as success because it has succeeded already (thanks to @robymus)\n\n#### 27-Aug-2016 - version 1.7.12 released  \nFeature - `SocketIOServer.removeAllListeners` method added  \nFeature - `BroadcastOperations.sendEvent` method with `excludedClient` param added  \nImprovement - Redisson updated to 2.4.0  \nFixed - memory leak in Namespace object (thanks to @CrazyIvan007)  \n\n\n#### 13-Jul-2016 - version 1.7.11 released  \nFixed - Throw error if transport not supported  \nFixed - Client disconnecting when using Polling - IndexOutOfBoundsException  \n\n#### 4-Mar-2016 - version 1.7.10 released  \nFixed - netty updated to 4.1.0.CR3 version  \nFixed - binary packet parsing (thanks to Winston Li)  \n\n#### 6-Feb-2016 - version 1.7.9 released  \nFeature - Compression support  \nFixed - DotNET client request handling  \nFixed - Packet length format parsing  \nFixed - skipping 'd=' in packet  \nFixed - Polling clients sporadically get prematurely disconnected (thanks to lpage30)  \nFixed - connections stay open forever if server sent `close` packet  \nFixed - compatibility with Redisson latest version  \n\n#### 30-Nov-2015 - version 1.7.8 released  \nImprovement - `WebSocketServerHandshaker.allowExtensions` is `true` now  \nImprovement - SessionID cookie implementation (thanks to @ryandietrich)  \nFixed - clientRooms leak (thanks to @andreaspalm)  \nFixed - ExceptionListener not used for errors in JSON parsing  \nFixed - \"silent channel\" attack    \n\n#### 26-Mar-2015 - version 1.6.7 released  \nImprovement - `useStrictOrdering` param added for websocket packets strict ordering  \nImprovement - `FAIL_ON_EMPTY_BEANS = false` option setted in json decoder  \n\n#### 18-Feb-2015 - version 1.7.7 released  \nImprovement - no need to add jackson lib if you use own JsonSupport impl    \nFixed - SocketIO client 1.3.x support  \nFixed - Charset encoding handling (thanks to  alim-akbashev)  \n\n#### 17-Jan-2015 - version 1.7.6 released  \nImprovement - `SocketIONamespace.getName()` added  \nFixed - WebSocket frames aggregation  \nFixed - WebSocket buffer release  \nFixed - `Unexpected end-of-input in VALUE_STRING` error  \nFixed - Access-Control-Allow-Credentials is TRUE for requests with origin header  \n\n#### 05-Dec-2014 - version 1.7.5 released  \nFeature - `Configuration.sslProtocol` param added  \nFixed - BinaryEvent ack handling  \nFixed - BinaryEvent non b64 encoding/decoding  \nFixed - buffer leak during packet encoding  \n\n#### 15-Nov-2014 - version 1.7.4 released  \nFixed - packet encoding  \nFixed - BinaryEvent encoding/decoding  \nFixed - unchallenged connections handling  \n\n#### 29-Sep-2014 - version 1.6.6 released  \nFeature - `origin` setting added  \nFeature - `crossDomainPolicy` setting added  \nFeature - `SocketIOServer.startAsync` method added  \n\n#### 24-Sep-2014 - version 1.7.3 released  \nFeature - Epoll support  \nImprovement - BinaryEvent support  \nFixed - SocketIOClient disconnect handling  \nFixed - broadcast callback  \nFixed - NPE then no transport defined during auth  \nFixed - ping timeout for polling transport  \nFixed - buffer leak in PacketEncoder  \n\n#### 22-Aug-2014 - version 1.7.2 released  \nFixed - wrong outgoing message encoding using websocket transport  \nFixed - NPE in websocket transport  \nFixed - multiple packet decoding in polling transport  \nFixed - buffer leak  \n\n#### 07-Jul-2014 - version 1.7.1 released  \nFeature - ability to set custom `Access-Control-Allow-Origin` via Configuration.origin  \nFixed - connection via CLI socket.io-client  \n\n#### 28-Jun-2014 - version 1.7.0 released\nFeature - Socket.IO 1.0 protocol support. Thanks to the new protocol decoding/encoding has speedup  \n__Dropped__ - `SocketIOClient.sendMessage`, `SocketIOClient.sendJsonObject` methods and corresponding listeners  \n__Dropped__ - Flashsocket transport support  \n__Dropped__ - protocol version 0.7 ... 0.9.16  \n\n#### 13-May-2014 - version 1.6.5 released\nImprovement - single packet encoding optimized, used mostly in WebSocket transport. Encoding time reduced up to 40% (thanks to Viktor Endersz)  \nImprovement - rooms handling optimized  \nImprovement - ExceptionListener.exceptionCaught method added  \n__Breaking api change__ - Configuration.autoAck replaced with ackMode  \nFeature - trustStore setting added  \nFeature - maxFramePayloadLength setting added  \nFeature - getAllClients and getClient methods added to SocketIONamespace  \nFixed - SocketIOServer.getAllClients returns wrong clients amount  \n\n#### 25-Mar-2014 - version 1.6.4 released\nFixed - message release problem  \nFixed - problem with exception listener configuration redefinition  \n__Breaking api change__ - DataListener.onData now throws Exception  \nImprovement - data parameter added to exception listener  \nImprovement - ability to setup socket configuration  \nImprovement - Configuration.autoAck parameter added  \n\n#### 06-Mar-2014 - version 1.6.3 released\nFixed - AckCallback handling during client disconnect  \nFixed - unauthorized handshake HTTP code changed to 401  \n__Breaking api change__ - Configuration.heartbeatThreadPoolSize setting removed  \nFeature - annotated Spring beans support via _SpringAnnotationScanner_  \nFeature - common exception listener  \nImprovement - _ScheduledExecutorService_ replaced with _HashedWheelTimer_  \n\n#### 08-Feb-2014 - version 1.6.2 released\nFixed - wrong namespace client disconnect handling  \nFixed - exception in onConnect/onDisconnect/isAuthorized methods leads to server hang  \n__Breaking api change__ - SocketIOClient.sendEvent methods signature changed  \nImprovement - multi type events support via _MultiTypeEventListener_ and _OnEvent_ annotation  \nImprovement - multi type events ack support via _MultiTypeAckCallback_  \nImprovement - SocketIOClient.getHandshakeData method added  \nImprovement - Jedis replaced with [Redisson](https://github.com/mrniko/redisson)  \n\n#### 14-Jan-2014 - version 1.6.1 released\nFixed - JDK 1.6+ compatibility  \nFeature - authorization support  \n\n#### 19-Dec-2013 - version 1.6.0 released\nFixed - XHR-pooling transport regression  \nFixed - Websocket transport regression  \nFixed - namespace NPE in PacketHandler  \nFixed - executors shutdown during server stop  \nFeature - client store (Memory, [Redis](http://redis.io/), [Hazelcast](http://www.hazelcast.com/)) support  \nFeature - distributed broadcast across netty-socketio nodes ([Redis](http://redis.io/), [Hazelcast](http://www.hazelcast.com/)) support  \nFeature - OSGi support (thanks to rdevera)  \nImprovement - XHR-pooling optimization  \nImprovement - SocketIOClient.getAllRooms method added\n\n#### 07-Dec-2013 - version 1.5.4 released\nFixed - flash policy \"request leak\" after page reload (thanks to ntrp)  \nFixed - websocket swf loading (thanks to ntrp)  \nFixed - wrong urls causes a potential DDoS  \nFixed - Event.class package visibility changed to avoid direct usage  \nImprovement - Simplified Jackson modules registration\n\n#### 24-Oct-2013 - version 1.5.2 released\nFixed - NPE during shutdown  \nImprovement - isEmpty method added to Namespace\n\n#### 13-Oct-2013 - version 1.5.1 released\nFixed - wrong ack timeout callback invocation  \nFixed - bigdecimal serialization for JSON  \nFixed - infinity loop during packet handling exception  \nFixed - 'client not found' handling  \n\n#### 27-Aug-2013 - version 1.5.0 released\nImprovement - encoding buffers allocation optimization.  \nImprovement - encoding buffers now pooled in memory to reduce GC pressure (netty 4.x feature).  \n\n#### 03-Aug-2013 - version 1.0.1 released\nFixed - error on unknown property during deserialization.  \nFixed - memory leak in long polling transport.  \nImprovement - logging error info with inbound data.\n \n#### 07-Jun-2013 - version 1.0.0 released\nFirst stable release.\n","funding_links":[],"categories":["Java","III. Network and Integration","网络编程"],"sub_categories":["2. Networking"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrniko%2Fnetty-socketio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrniko%2Fnetty-socketio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrniko%2Fnetty-socketio/lists"}