Skip to content

support attaching multiple TCP connections to the same nick / registration #403

@slingamn

Description

@slingamn

jwheare points out that this more or less means making the server act as a bouncer. Basically:

  1. Config setting like allow-multiple-connections
  2. If enabled, a second connection/registration for the same nick is allowed
  3. Implementation: the connection gets shoved into the same old Client object; any time we would send to the client's socket, we instead send to all the sockets
  4. Caps are whatever the original session negotiated
  5. 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.IrcMessage that multiple reader goroutines can send to)
  6. 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.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions