Skip to content

ws.on not listen the events #1

@kuppasekhar

Description

@kuppasekhar

Hi, I am using this library for my project to send and receive the data. I am able to connect websocket using this library but I am unable to subscribe the specific channel using this below code.
// Subscriber
ws.on("/topic/greetings", new Ws.WsListner() {
@OverRide
public void onEvent(String eventUri, Object data) {
System.out.println("EVENT URI:: "+ eventUri);
System.out.println("EVENT DATA IS:: "+ data);
if(data != null) {

            }
        }
    });

//Sender
ws.send("/app/hello","Hello, welcome");

// End point Url
String url = "ws://10.0.2.2:8080/hello";

Please check and do needful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions