Giter Site home page Giter Site logo

netty-socketio-demo's Introduction

Netty-socketio Demo

Demo for Netty-socketio project.

Usage example

  1. Build or install Netty-socketio lib to your maven repository. mvn clean install

  2. Switch to /server folder and build server by maven.

  3. Run server by command mvn exec:java

  4. Run client in browser, by opening* file /client/index.html

Note about Chrome and IE browsers

If you want to open index.html in Chrome or IE browser you need to host it somewhere (nginx or apache, for example), or page will not work due to absence of correct "origin" http header.

Demo scenarios

By default you will run a chat which communcate with server via json objects. There are several demo scenarios available:

Class - Web client page

com.corundumstudio.socketio.demo.ChatLauncher - /client/index.html

com.corundumstudio.socketio.demo.EventChatLauncher - /client/event-index.html

com.corundumstudio.socketio.demo.SslChatLauncher - /client/ssl-event-index.html

com.corundumstudio.socketio.demo.NamespaceChatLauncher - /client/namespace-index.html

com.corundumstudio.socketio.demo.AckChatLauncher - /client/ack-index.html

com.corundumstudio.socketio.demo.BinaryEventLauncher - /client/binary-event-index.html

You can select appropriate server launcher by command with main.class parameter:

mvn exec:java -Dmain.class=com.corundumstudio.socketio.demo.SslChatLauncher

netty-socketio-demo's People

Contributors

ilyash-b avatar mrniko avatar peter-donner avatar terrysolar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netty-socketio-demo's Issues

lambda not working

when i change
server.addEventListener("chatevent", ChatObject.class, new DataListener() {
@OverRide
public void onData(SocketIOClient client, ChatObject data, AckRequest ackRequest) {
System.out.println(data.getUserName() + ": " + data.getMessage());
}
});

to

server.addEventListener("chatevent", ChatObject.class, (client, data, ackRequest) -> {
System.out.println(data.getUserName() + ": " + data.getMessage());
});

it wont work anymore. Maybe my fault.
Nice code btw

Can I connect this to any Java client ?

Hey guys,

I am trying to use your library to do a server to server communication, and I am having some trouble connecting spring-boot-starter-websocket client.

I get a failure specially when using a namespaced connection.

Can you please help me with either a java client that would work with this library. I would be more than happy to create a PR demonstrating that if successful.

Demo Server Launching Problems

When attempting to build and launch the demo server application, I run into an error trying to run the demo server with the mvn exec:java command.

The following is the output I receive when running this command:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building demo 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ demo >>>
[INFO] 
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ demo <<<
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ demo ---
[WARNING] 
java.lang.NoClassDefFoundError: com/corundumstudio/socketio/listener/DataListener
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
    at java.lang.Class.getMethod0(Class.java:2774)
    at java.lang.Class.getMethod(Class.java:1663)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: com.corundumstudio.socketio.listener.DataListener
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.811s
[INFO] Finished at: Wed Nov 20 19:36:28 CST 2013
[INFO] Final Memory: 5M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project demo: An exception occured while executing the Java class. com/corundumstudio/socketio/listener/DataListener: com.corundumstudio.socketio.listener.DataListener -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Based on the output, it seems that the maven builder is able to find the appropriate 'netty-socketio' jar file, but not able to find all class information that should be available through this file (in particular, the DataListener type appears to be missing).

Any advice for how I may be able to fix this error? Thanks in advance for your help.

Missing repo

It seems missing link to repo (server pom.xml)

Failed to execute goal on project demo: Could not resolve dependencies for project demo:demo:war:1.0-SNAPSHOT: Could not find artifact com.corundumstudio.socketio:netty-socketio:jar:1.0.0 in central (http://repo.maven.apache.org/maven2)

Namespace demo does not work

Throws the following error when opening "namespace-index.html".

[nioEventLoopGroup-3-1] ERROR com.corundumstudio.socketio.handler.InPacketHandler - Error during data processing. Client sessionId: 23a1c24c-f2cc-4754-b38b-aca248909973, data: :40/chat1
java.lang.IllegalStateException
    at com.corundumstudio.socketio.protocol.PacketType.valueOf(PacketType.java:48)
    at com.corundumstudio.socketio.protocol.PacketDecoder.readType(PacketDecoder.java:85)
    at com.corundumstudio.socketio.protocol.PacketDecoder.decode(PacketDecoder.java:132)
    at com.corundumstudio.socketio.protocol.PacketDecoder.decodePackets(PacketDecoder.java:114)
    at com.corundumstudio.socketio.handler.InPacketHandler.channelRead0(InPacketHandler.java:65)
    at com.corundumstudio.socketio.handler.InPacketHandler.channelRead0(InPacketHandler.java:36)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:187)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at com.corundumstudio.socketio.transport.PollingTransport.onPost(PollingTransport.java:161)
    at com.corundumstudio.socketio.transport.PollingTransport.handleMessage(PollingTransport.java:120)
    at com.corundumstudio.socketio.transport.PollingTransport.channelRead(PollingTransport.java:97)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at com.corundumstudio.socketio.handler.AuthorizeHandler.channelRead(AuthorizeHandler.java:115)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:108)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:182)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
    at java.lang.Thread.run(Thread.java:745)

Rename classes to *Launcher.java

Hi, just a typo (but it took me 10 minutes to figure it out why classnotfound exception was appearing while to run the demo examples.

Classes should be spelled ChatLauncher, EventChatLauncher and SslChatLauncher. Documentation (i.e. Readme.md) should be updated accordingly.

Thanks.

SSL with *.pem certificates

Is it possible to use certificates with extension * .pem for SSL?, if it can be used, the implementation is done in the same way as it is done for JKS certificates or it is done in a different way.

Please make SSL demo work

Ssl demo doesn't work at the moment:

  1. The server is successfully started (through the SslChatLauncherclass).

Unfortunately, the client (ssl-event-index.html)) doesn't work - the following is printed to console:

socket.io.js:2 GET https://localhost:10443/socket.io/?EIO=3&transport=polling&t=1484898108014-43 net::ERR_INSECURE_RESPONSE

⚠️BinaryEventLauncher.java (sending array of byte)

it shows received data as "��-"
Seen many others have this issue.

Is there any way to send serialized object as json (avoiding duplicate serialization),
I saw there's a config.setJsonSupport(...), but i need different Jackson configuration per different responses.

using version 1.7.15

Can't use BroadcastOperations to transfer binary data to All clients?

first of all, I am not good at English, please let me konw if you don't know what i say.

I modifed the example of BinaryEventLauncher as below, just to Let All connected client can see the picture if some one upload picture:

    server.addEventListener("msg", byte[].class, new DataListener<byte[]>() {
        @Override
        public void onData(SocketIOClient client, byte[] data, AckRequest ackRequest) {
            server.getBroadcastOperations().sendEvent("msg", data);
            //client.sendEvent("msg", data);
        }
    });

but It doesn't work, not all connected client can see the upload picture, maybe something wrong?

I have to use the for loop to make sure it work as i want:

    server.addEventListener("msg", byte[].class, new DataListener<byte[]>() {
        @Override
        public void onData(SocketIOClient client, byte[] data, AckRequest ackRequest) {
            for(SocketIOClient socketIOClient:server.getAllClients()){
                socketIOClient.sendEvent("msg", data);
            }
            //server.getBroadcastOperations().sendEvent("msg", data);
            //client.sendEvent("msg", data);
        }
    });

please tell me why? do i have to use the for loop instead of BroadcastOperations?

the demo could not work .

your demo source code not suit for the socketio which version 1.7.2. There is no this method SocketIONamespace.addJsonObjectListener().

Demo does not work

The client side is giving this error:
XMLHttpRequest cannot load http://127.0.0.1:9092/socket.io/1/?t=1408262517434. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

The server is giving this error:
[nioEventLoopGroup-3-4] WARN com.corundumstudio.socketio.handler.WrongUrlHandler - Blocked wrong socket.io-context request! url: /socket.io/1/, params: {t=[1408262517434]}, ip: /127.0.0.1:51783

Tried setting config.setOrigin("http://127.0.0.1"); (":" etc.)but does not work.

IE browser support for example

I have hosted it in apache, it works fine in chrome,firefox and IE(8,10).But client can not connect in IE9;
and client can connect in IE6, IE7, when sending a message error has occurred.

Error msg:
Line: 4
Char: 2234
Error: Object doesn't support this property or method
Code: 0

How to use the protobuf protocol?

HI:
In the web page, If don't use the json protocol and use the protobuf protocol, how do I change the server?
Thank you very much!!!!!!

java.lang.NoSuchFieldError: ORIGIN

My netty version is netty-all-5.0.0.Alpha2. When a client requests to report the following error :

An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.NoSuchFieldError: ORIGIN
	at com.corundumstudio.socketio.handler.AuthorizeHandler.channelRead(AuthorizeHandler.java:126)

To access the server remotely

Hi, I am trying to make the server remotely accessible (as now it seems like it can only be accessed with local socket)

However, i don't have a clue.
I tried to put my ip address as the hostname of the config. But it doesn't work.

Can anyone please tell me how to make the server remotely accessible. Thanks

1 required missing artifact

Hi,

I'm trying to run the demo - I ran the two maven commands.

I get this error on mvn exec:java

1 required artifact is missing.

for artifact:
com.corundumstudio.socketio:demo:jar:1.0.0-SNAPSHOT

Where would I get this jar file ?

Demo project doesn't seem to build

The errors are listed below, looks like a couple methods are being called on interfaces that are not on those interfaces. I was trying to evaluate the project for use and tried following the directions but couldn't get past step #2. Thanks!

[ERROR] /Users/jt/osProjects/netty-socketio-demo/server/src/main/java/com/corundumstudio/socketio/demo/NamespaceChatLauncher.java:[20,55] error: cannot find symbol
[ERROR] symbol: method sendJsonObject(ChatObject)
location: class BroadcastOperations
/Users/jt/osProjects/netty-socketio-demo/server/src/main/java/com/corundumstudio/socketio/demo/NamespaceChatLauncher.java:[16,22] error: cannot find symbol
[ERROR] symbol: method addJsonObjectListener(Class,<anonymous DataListener>)
location: variable chat1namespace of type SocketIONamespace
/Users/jt/osProjects/netty-socketio-demo/server/src/main/java/com/corundumstudio/socketio/demo/NamespaceChatLauncher.java:[29,55] error: cannot find symbol
[ERROR] symbol: method sendJsonObject(ChatObject)
location: class BroadcastOperations
/Users/jt/osProjects/netty-socketio-demo/server/src/main/java/com/corundumstudio/socketio/demo/NamespaceChatLauncher.java:[25,22] error: cannot find symbol

how to configure Socket IO server on SSL domain

hi,
please could you explain how I can configure socket server for a domain on SSL. When I give localhost as hostname and port as 10443 for SSL it gets started. But how should we configure using a domain name? suppose my domain is https://abc.com. if I give configuration.setHostname("abc.com"); its shows error while starting the server. Should I just give the IP address? It started when I gave IP but could not connect from client like this - io.connect("https://IP:10443")
Request any help on this. thanks a lot.

Bug when send binary data

same question: mrniko/netty-socketio#755

Buy when send binary, there happened circular reference, but the same binary data sometimes has problems, sometimes normal

how i call :

@Override
public void sendEvent(String name, Object... data) {
    Packet packet = new Packet(PacketType.MESSAGE);
    packet.setSubType(PacketType.EVENT);
    packet.setName(name);
    packet.setData(Arrays.asList(data));
    send(packet);
}

and i have try:

@Override
public void sendEvent(String name, Object... data) {
    Packet packet = new Packet(PacketType.MESSAGE);
    packet.setSubType(PacketType.BINARY_EVENT);
    packet.setName(name);
    packet.setData(Arrays.asList(data));
    send(packet);
}
Error content: 
org.redisson.client.RedisException: Unexpected exception while processing command
	at org.redisson.command.CommandAsyncService.convertException(CommandAsyncService.java:320)
	at org.redisson.command.CommandAsyncService.get(CommandAsyncService.java:165)
	at org.redisson.RedissonTopic.publish(RedissonTopic.java:61)
	at com.corundumstudio.socketio.store.RedissonPubSubStore.publish(RedissonPubSubStore.java:50)
  .....
  .....
  Caused by: com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]
.....
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
......
Caused by: java.lang.StackOverflowError: null
	at java.lang.Exception.<init>(Exception.java:66)
	at java.io.IOException.<init>(IOException.java:58)
	at com.fasterxml.jackson.core.JsonProcessingException.<init>(JsonProcessingException.java:25)
	at com.fasterxml.jackson.core.JsonProcessingException.<init>(JsonProcessingException.java:41)
	at com.fasterxml.jackson.databind.JsonMappingException.<init>(JsonMappingException.java:251)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
......

client.join("roomName"),but server.getRoomOperations(roomName+"/"+roomName).Why arguments are not the same?

    server.addJsonObjectListener(ChatObject.class, new DataListener<ChatObject>() {
        @Override
        public void onData(SocketIOClient client, ChatObject data, AckRequest ackRequest) {
            String roomName=data.getRoomName();
            if(!client.getAllRooms().contains(roomName)){
                client.joinRoom(roomName);
            }
            log.debug("roomName is "+roomName+" message is "+data.getMessage());
            server.getRoomOperations(roomName+"/"+roomName).sendJsonObject(data);
            //server.getBroadcastOperations().sendJsonObject(data);
        }
    });

Is there any sample code on big file upload ?

thanks your amazing socket io framework.i check the sample code on BinaryEventLauncher.it's just a simple image file upload.Is there any sample code on big file upload ? or integrate with html5?
best wishes!

How can server send broadcst message to all client

Using ChatLauncher, I am not getting how can server send message to all connected clients. Current implementation only when any client send message it broadcast to all. In this case server cannot initiate its message to send its own message like server sends anytime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.