Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to reach an Event inside channel with Socket.IO #140

Open
shashoug opened this issue Sep 1, 2020 · 1 comment
Open

I want to reach an Event inside channel with Socket.IO #140

shashoug opened this issue Sep 1, 2020 · 1 comment

Comments

@shashoug
Copy link

shashoug commented Sep 1, 2020

i used this library for listening to an specific event inside a channel here's my code snippet:
` try{
SocketIOManager manager = SocketIOManager();
SocketIO socket = await manager.createInstance(SocketOptions('http://127.0.0.1:3000',nameSpace: '/',enableLogging: true,path: null)); //TODO change the port accordingly
socket.onConnect((data){
print("connected...");
print(data);

});
socket.on('test-channel', (data){ //sample event

print(data);

});
socket.connect();
socket.on('Socket', (data) { print(data);});

}
catch(e){

  print('connection error');

}`
nothing showed in the log, and no data displayed with no error message.
my channel name is : 'test-channel'.
my event name is : 'Socket'
any solutions guys :'(

@deepashree-ballodi
Copy link

deepashree-ballodi commented Sep 9, 2020

Same here

socket.on("senderPeer",(message) {
print(message);
});

actually message is emitting. But on event method print nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants