netty-chat | 使用Netty实现IMServer,支持Tcp和WebSocket实现。 | Websocket library

 by   tonybase Java Version: Current License: No License

kandi X-RAY | netty-chat Summary

kandi X-RAY | netty-chat Summary

netty-chat is a Java library typically used in Networking, Websocket applications. netty-chat has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.


            kandi-support Support

              netty-chat has a low active ecosystem.
              It has 478 star(s) with 319 fork(s). There are 77 watchers for this library.
              It had no major release in the last 6 months.
              There are 4 open issues and 4 have been closed. On average issues are closed in 27 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of netty-chat is current.

            kandi-Quality Quality

              netty-chat has 0 bugs and 0 code smells.

            kandi-Security Security

              netty-chat has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              netty-chat code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              netty-chat does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              netty-chat releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 5409 lines of code, 329 functions and 42 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed netty-chat and discovered the below as its top functions. This is intended to give you an instant insight into netty-chat implemented functionality, and help decide if they suit your requirements.
            • Decode packet
            • Returns the length of the packet
            • Gets the length of the header
            • Sets the header length
            • Encodes the web socket
            • Gets the sequence id
            • Gets the message body
            • Obtain a connection from a given server
            • Returns the key for the given uid
            • Starts the server
            • Restart the server
            • List of operations
            • Sends a heartbeat message to the server
            • Shutdown channel
            • Handle exception
            • Update producer
            • Starts the worker thread
            • Quit a client
            • Main application
            • The default cache manager
            • Performs authentication
            • Receives a message
            • Method to encode the list
            • Handles send operation
            • Initialize channel
            • Decodes the message body
            Get all kandi verified functions for this library.

            netty-chat Key Features

            No Key Features are available at this moment for netty-chat.

            netty-chat Examples and Code Snippets

            No Code Snippets are available at this moment for netty-chat.

            Community Discussions


            Unable to create Channel from class
            Asked 2018-Mar-08 at 19:51
             package com.examplechat;
            import io.netty.bootstrap.Bootstrap;
            public class ChatClient {   
                public static void main(String[] args) throws InterruptedException, IOException  {
                  new ChatClient("localhost", 8000).run();
                private final String host;
                private final int port;
                public ChatClient(String host, int port) {
           = host;
                    this.port = port;
                public void run() throws InterruptedException, IOException {
              EventLoopGroup group = new NioEventLoopGroup();  
              try {
                  Bootstrap bootstrap = new Bootstrap()
                          .handler(new ChatClientInitilizer());       
                  Channel channel = bootstrap.connect(host, port).sync().channel(); 
                  BufferedReader in = new BufferedReader(new InputStreamReader(;
                 while(true) {
                     channel.write(in.readLine()+ "\r\n");
              finally {
                group.shutdownGracefully();  } 
            package com.examplechat;
            import io.netty.bootstrap.ServerBootstrap;
            public class ChatServer {
            public static void main(String[] args) throws InterruptedException  {
                    new ChatServer(8000).run();
                private final int port;
                public ChatServer(int port) {
                    this.port = port;
                public void run() throws InterruptedException  {
                    EventLoopGroup bossGroup = new NioEventLoopGroup();
                    EventLoopGroup workerGroup = new NioEventLoopGroup();
                    try {
                        ServerBootstrap bootstrap = new ServerBootstrap()
                        .group(bossGroup, workerGroup)
                        .childHandler(new ChatServerInitializer());
                    finally {


            Answered 2018-Mar-08 at 09:52

            I was getting error as

            Unable to create Channel from class class which is Caused by: java.lang.UnsupportedOperationException: cannot open shared object file: No such file or directory`

            This error was cleared once I install lksctp-tools by:

            sudo apt-get install lksctp-tools

            Now channel has been registered. But I'm getting a new error that WARNING:

            Failed to initialize a channel. Closing: [id: 0x9e4e05e0] java.lang.ClassCastException: cannot be cast to


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install netty-chat

            You can download it from GitHub.
            You can use netty-chat like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the netty-chat component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer For Gradle installation, please refer .


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone tonybase/netty-chat

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Websocket Libraries


            by netty


            by websockets


            by gorilla


            by joewalnes


            by koel

            Try Top Libraries by tonybase


            by tonybaseGo


            by tonybaseJava


            by tonybaseJava


            by tonybaseJava