Skip to content

Document distinct read and idle timeouts #86

Closed
@propertyscott

Description

@propertyscott

How do I protect against a client that stops sending data, either between messages or within a message?

With Gorilla, I can use a combination of read deadline and ping/pong to ensure that a client is sending messages. Once reading a message, I can set the read deadline to ensure that the client sends the message in a timely fashion.

With this package, I can specify one timeout using the context argument to Conn.Reader. How do I adjust that value after a successful call to Conn.Ping? How do I adjust that value down after receiving the first byte of message data?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions