Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nishchit
    @Nishchit14
    basavarajayyahtrigent
    @basavarajayyahtrigent
    Hi
    I am using socket.io 2.2 in nodejs server, and when trying to emit an event to a room under a namespace it's not working
    any suggestion?
    io.of('/namespace').in(room).emit('event-name', somedata);
    is it correct?
    Ambika Kumar
    @ambikarajbadal
    how can i access the express-session in socket.io?
    Md. Alamin (Miraje)
    @mirajehossain
    Hey, I am trying to implement a quiz game application, I am facing a problem with socket in nodejs and android, socketIO event fired multiple time, I already create question in stackoverflow, can anyone help please
    Hey @basavarajayyahtrigent ,you can try this one, it should worked: io.of('namespace').to('room').emit('event', somedata);
    Thomas Havlik
    @thavlik
    I am having difficulty emitting a Uint8Array or a Buffer from a server to a jest test script running in a node environment. The message simply never arrives. I am attempting to send a buffer with a single zeroed byte, and it never arrives. Switching it to a string allows the message to arrive without issue
    I cannot emit it directly - io.emit("ev", buf) nor can I box it: io.emit("ev",{buf}) and io.emit("ev", { buf: buf.buffer }) all never arrive
    Thomas Havlik
    @thavlik
    Switching the testEnvironment of jest.config.js back to jsdom (the default) fixes the issue... why?
    This is a bug.
    If Node -> Node connections cannot send buffers outside of jest, then this is probably a bug with socket.io
    nasreddine skandrani
    @nasreddineskandrani
    Hi guys
    i am working on an MVP.
    crafting with a baby is not easy :) i wish one of you can tell me more about this without having to google it
    basically i implemented something with some socket . Then i used "Smart WebSocket CLient" to hit my backend in nodeJS
    but i was using ws://localhost:3333
    it was not working
    i saw in the comment this ws://localhost:3333/socket.io/?EIO=3&transport=websocket i tried it and it works
    can someone tell me why these params are needed? (thanks for your time in advance)
    Facha_2004
    @sebastianmosch1_twitter
    holi
    Dinesh Kumar
    @Dinesh5799
    Hi
    need some help with socket.io
    John Edwards
    @javajohnHub
    i created a site using socket io to help developers collaborate if anyones interested https://sharecode.online
    ramin
    @sirramin_gitlab
    Is it possible to make socket.io connections live after Nodejs server restarts ?
    Phan Dang Dien
    @phandd
    Hi guys, I'm upgrading socket.io from 1.2.1 to 2.2.0, seems like from the first time, same namespace uses the same connection, but now it creates a new connection I'm I right?
    spacetime
    @justinemar

    is it okay to add a custom attribute to a socket client?
    This seems possible but i am not sure if this is acceptable

    socket['identifier'] = assignedIdentity() // return 'id-5d5ce5d9c360990e7c325406'

    spacetime
    @justinemar
    nvm found an example seems to be accepted method https://github.com/socketio/socket.io/blob/318d62/examples/chat/index.js#L36
    Vimal Mistry
    @vimalmistry
    Hi everyone. can somebody explain me what is engine.io and socket-redis adaptor use?. Document doesnt help me to understand. Please.
    Md. Alamin (Miraje)
    @mirajehossain

    Hy @vimalmistry ,
    EngineIO: To establish the connection, and to exchange data between client and server, Socket.IO uses Engine.IO. This is a lower-level implementation used under the hood. Engine.IO is used for the server implementation and Engine.IO-client is used for the client.

    Socket.io-radis:
    with the socket.io-redis adapter you can run multiple socket.io instances in different processes or servers that can all broadcast and emit events to and from each other.

    Vimal Mistry
    @vimalmistry
    @mirajehossain Thank you for explanation. I want to implement features like. when client is offline I can save event to redis or mongo whatever and when client will online it can autosend event. Is there any solutioin like this?
    ratnesh258
    @ratnesh258
    Hello All,
    I have crated a chat application which has one to one and group chat facility. The Problem i am facing is like sometime a user from other country is not able join the group chat in which already two users is connected from same country. ex. if User A and User B are chatting in group and they are from same country Say X then if User C from Country Y is not able to join that group event though another User D with same country X has connected successfully to that group chat. so can you guys please explain me why i am facing this problem. is it related to socket io or any other thing
    Tarang Sachdev
    @tarangsachdev92

    Hello folks
    I am having error
    socket.io websocket is already in closing or closed state
    I have used it in angular application

    Specification:
    macOs
    Browser chrome : Version 79.0.3945.88 (Official Build) (64-bit)
    "socket.io-client": "^2.3.0”

    Priyank Vaghela
    @Priyank-Vaghela

    Hello everyone,
    I have multiple Socket.IO nodes and a Redis adaptor to communicate between multiple nodes.
    In that when I broadcast a message - every user from every node does receive it.

    Issue:

    • When I send a One-to-One (user) message - the receiver does receive the message - but I’m unable to get the callback acknowledgement.

    Here's the error:

    Error: Callbacks are not supported when broadcasting redis
    Aviraj Khare
    @avirajkhare00
    Hello. I have built this simple game using socket.io. Please check: http://gocorona.codeignition.tech/game?game_name=global_game
    Aaron "PP"
    @aaronpp65
    Hai, i am new to socket. I have a client running and when i restart server , client is receiving data multiple times . The image shows me try to send a ls\r command from server to client
    Screenshot from 2020-03-29 01-23-34.png
    can anyone help me with this? i am stuck and dont know what to do
    Vamshi Krishna Kesetty
    @vamshi2055
    Hi..i have an issue that websocket is terminated and a new session is created when browser is refreshed...Do we have a solution for this?
    TrofinSorin
    @TrofinSorin

    Hello guys, i have a problem with chat between 2 users without using a room.

    So each user when it connects i'm storing their socket id in a hashmap, on front end i have the socket for each user so when i'm sending message i'm using io.to('the user id).emit('chat message', msg);

    Now on frontend i'm listening to the socket.on('chat message', data => {
    pushing messages logic into an array that will be inside chat here
    });

    The thing is that when i'm sending the message to the user i wanna send it to, he will receive the message it emits, but i won't be able to push my own message, because the socket id is different, he sees the message i don't, and by using 2 emits on server side one to my socket and one to his socket will cause bugs, do i really need to do rooms?

    If i use rooms, when i click on the avatar of any user i will need to emit a room creation, then i will send the message, then the user when he receives the message will need to do join room and then send message back right?
    This will mean that the room name will be the id of the socket that sended first the message right?
    Manjunath V A
    @manjunathva_gitlab
    @TrofinSorin Before pushing emitting the message to backend, first push the message in font-end.
    aditya
    @adibro500
    hi i am getting CORS error in socket.io express js app
    when consuming from angular client
    Md. Alamin (Miraje)
    @mirajehossain
    Hey @adibro500 , did you use cors cors into your application ??
    Bhagyaraju
    @bhagi1289
    how to communicate socket.io through expressgateway, any example code please