-
Notifications
You must be signed in to change notification settings - Fork 231
support attaching multiple TCP connections to the same nick / registration #403
Copy link
Copy link
Closed
Milestone
Description
jwheare points out that this more or less means making the server act as a bouncer. Basically:
- Config setting like
allow-multiple-connections - If enabled, a second connection/registration for the same nick is allowed
- Implementation: the connection gets shoved into the same old
Clientobject; any time we would send to the client's socket, we instead send to all the sockets - Caps are whatever the original session negotiated
- Client commands can probably still only execute on a single goroutine, since we want client commands executing in a well-defined order. (Do we though?) (If we do, this is finally a good use case for channels: the client goroutine can wait on a
chan ircmsg.IrcMessagethat multiple reader goroutines can send to) - Ping timeout and QUIT remove a socket, not the whole client; the client is only removed once all its sockets are gone. (In the sequel, we introduce a configurable "sticky" mode, for use with persistent history, where the client is not removed even when all its sockets are gone; PRIVMSG go straight to persistent history instead.)
Reactions are currently unavailable