netty-socketio-demo icon indicating copy to clipboard operation
netty-socketio-demo copied to clipboard

lambda not working

Open Olgidos opened this issue 7 years ago • 0 comments

when i change server.addEventListener("chatevent", ChatObject.class, new DataListener<ChatObject>() { @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

Olgidos avatar Dec 18 '17 18:12 Olgidos