Skip to content

feature: add net.channel #14

Description

@PyXiion

Parent: #13

Add the network-backed channel implementing the async.channel contract.

Required API:

local ch = net.channel("events", {
  player = player,
  capacity = 32,
})

ch:send(value)
ch:trySend(value)
ch.handler = function(value, sender) end
for value, sender in ch do end

Acceptance criteria:

  • Reliable ordered delivery by default.
  • Bounded per-recipient queues.
  • send suspends when full.
  • trySend never suspends.
  • Server receives include the sending player.
  • Player binding routes only between server and the bound player.
  • Server-wide sends use independent per-player queues.
  • Handler and iterator are alternative consumers.
  • Disconnect closes the channel cleanly.
  • Serialization failures reject sends.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions