Skip to content

Is it possible to have a Socket.io connection between two backend files, with no Client involved? #4941

Discussion options

You must be logged in to vote

Yes! One server can act as a client, and the other one as an actual server.

You can also have the two servers act as servers, and then use io.serverSideEmit() to exchange data between them.

Reference: https://socket.io/docs/v4/server-instance/#serversideemit

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@respectabiggle
Comment options

@darrachequesne
Comment options

@respectabiggle
Comment options

Answer selected by darrachequesne
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants