crux_gateway v0.1.0 Crux.Gateway.IdentifyLimiter View Source

Handles the Identifying rate limit of 1 per 5 seconds.

This module is automatically used by Crux.Gateway.Connection, you do not need to worry about it.

Link to this section Summary

Functions

Starts the module if necessary and queues the packet. Blocks the process until the identify may be sent

Starts the identify limiter

Link to this section Functions

Link to this function queue(packet) View Source
queue(packet :: term()) :: term()

Starts the module if necessary and queues the packet. Blocks the process until the identify may be sent.

The packets will return in the order as they arrive at the rate limiter, those are sent via GenServer.call/2. Returns the packet as is.

Automatically used by Crux.Gateway.Connection.

Starts the identify limiter.