aboutsummaryrefslogtreecommitdiffstats
path: root/doc
AgeCommit message (Collapse)Author
2025-04-11Fix Cowlib version in migration guideHEADmasterLoïc Hoguin
2025-04-10Add migration guide for Gun 2.2Loïc Hoguin
2025-03-28Recommend disabling automatic reconnect for WebsocketLoïc Hoguin
2025-03-27Add a paragraph about HTTP/2 compressed headers security riskLoïc Hoguin
2025-03-26Remove copyright years from all files except LICENSELoïc Hoguin
2025-03-26Improve the gun:ping manualLoïc Hoguin
2025-03-21Add gun:ping/2,3 for user-initiated ping for HTTP/2Viktor Söderqvist
Signed-off-by: Viktor Söderqvist <[email protected]>
2025-02-27Include event handler state in gun:info/1 resultViktor Söderqvist
Adds event_handler and event_handler_state in the map returned by gun:info/1. Signed-off-by: Viktor Söderqvist <[email protected]>
2025-02-26Add docs for notify_settings_changed in http2_opts()Björn Svensson
LH: I have expanded and documented gun_notify in its own page.
2025-02-26Allow specifying functions for reply_toViktor Söderqvist
LH: I have fixed types, extended tests and tweaked a bit.
2025-02-25Add state_name field to gun:info/1Viktor Söderqvist
2024-03-14Tweak user guide migration linkLoïc Hoguin
2024-03-14Gun 2.1.02.1.0Loïc Hoguin
2024-03-14Update Cowlib to 2.13.0Loïc Hoguin
2023-04-28Gun 2.0.12.0.1Loïc Hoguin
2023-01-23Update copyright lines in preparation for releaseLoïc Hoguin
2023-01-23Update the migration guide for 2.0Loïc Hoguin
2022-12-06Add keepalive_tolerance http2 optionViktor Söderqvist
The number of unacknowledged pings that can be tolerated before the connection is forcefully closed. When a keepalive ping is sent to the peer, a counter is incremented and if this counter exceeds the tolerance limit, the connection is forcefully closed. The counter is decremented whenever a ping ack is received from the peer. By default, the mechanism for closing the connection based on ping and ping ack is disabled. Loïc Hoguin: I have edited a lot of the code and renamed a few things as well as simplified the docs and increased test timeouts to avoid race conditions.
2022-12-05Document Websocket subprotocol negotiationLoïc Hoguin
2022-11-21Enable send timeouts by defaultLoïc Hoguin
When no TCP options are provided, Gun will enable send timeouts at 15s. The value was chosen large enough to be safe while still allowing Gun to detect send errors eventually. Different applications may need to tweak and lower this value.
2021-05-24Gun 2.0.0-rc.22.0.0-rc.2Loïc Hoguin
2021-02-08Fix a typo in migrating_from_1.3.asciidocErlend Hamberg
2021-02-07Initial commit for Gun poolsLoïc Hoguin
The approach taken here is very similar to what browsers are doing. A separate pool is created for each host/port/scope. The authority (host header) is used to determine which pool will execute requests. A connection process is semi-randomly chosen, from the connections that have capacity. Maximum capacity is determined by the protocol (the HTTP/2 setting set by the server is used, for example). Multiple processes can process requests/responses on the same connection concurrently. There is no need to "give back" the response to the pool, the number of ongoing streams is maintained via an event handler. The implementation is currently not strict, there may be more attempts to create requests than there is capacity. I'm not sure if it should be made strict or if Gun should just wait before sending requests (it only matters in the HTTP/2 case at the moment). When there is no connection with capacity available in the pool (because they have too many streams, or are reconnecting, or any other reason), checking out fails. There is no timeout to wait for a connection to be available. On the other hand the checkout_retry option allows setting multiple timeouts to retry checking out a connection. Each retry attempt's wait time can have a different value. The initial implementation of this work was sponsored by Kobil and made at the suggestion of Ilya Khaprov.
2020-11-19Grammar fix on most recent changelog2.0.0-rc.1Loïc Hoguin
2020-11-19Update Cowlib to 2.10.1Loïc Hoguin
2020-11-12Return 'undefined' for raw|socks origin_scheme where applicableLoïc Hoguin
2020-11-12Update copyright yearsLoïc Hoguin
2020-11-12Replace gun:ws_send/2 with gun:ws_send/3Loïc Hoguin
Switching from /2 to /3 should be easy enough. Also update the documentation about HTTP/2 Websocket support.
2020-11-12Add more new keys to gun:info and gun:stream_info manualsLoïc Hoguin
2020-11-12Use gun:stream_ref() where applicableLoïc Hoguin
2020-11-12Update gun_tunnel_up manualLoïc Hoguin
It was missing the StreamRef from the message.
2020-11-11Initial internals chapter about TLS over TLSLoïc Hoguin
2020-11-09Update the migration guide and the gun(3) manualLoïc Hoguin
2020-11-09Add the gun_event manualLoïc Hoguin
2020-10-07Default keepalive to infinity for all protocolsLoïc Hoguin
For HTTP/2 some servers are not fond of receiving pings, especially if there's no stream at the time. (particularly gRPC servers). This is an odd decision for sure. Rather than trying to accomodate for their logic the ping is no longer sent by default. For Websocket sending a ping is a new feature in Gun 2.0 so I'm just being conservative there.
2020-09-21Rename the 3-arity gun_socks_up to gun_tunnel_upLoïc Hoguin
2020-03-25Update migration guideLoïc Hoguin
2020-03-23Require OTP-22+Loïc Hoguin
2020-03-15Document the cookie store option and related modulesLoïc Hoguin
Also contains a few small changes and Dialyzer fixes.
2020-03-12Make Gun use the cookie store when configured toLoïc Hoguin
2019-09-26Add the migration guide to 2.0Loïc Hoguin
2019-09-26Document the cow_http2_machine optionsLoïc Hoguin
The details are not given for now. The best would be to document them in Cowlib and refer to that documentation instead of duplicating the information in both the Gun and Cowboy manuals.
2019-09-26Remove UnprocessedStreams from the gun_down messageLoïc Hoguin
2019-09-26Add reply_to option to ws_upgrade; remove notowner entirelyLoïc Hoguin
The reply_to option is also propagated when we switch protocols.
2019-09-26Add a function to change the connection ownerLoïc Hoguin
While at it the gun:info/1 function has been fixed to work even when we are in the not_connected state, and the owner is now also returned.
2019-09-24Add auto-ping to Websocket and a silence_pings optionLoïc Hoguin
The auto-ping will at regular interval send a ping frame. The silence_pings option defaults to true. It can be set to false when the user needs to receive ping/pong frames.
2019-09-23Document sending N Websocket frames in the guideLoïc Hoguin
2019-09-22Document Socks supportLoïc Hoguin
Also correct various Socks related types. This commit also adds a new gun:protocols/0 type as a simpler way of describing preferred protocols. The protocol/opts tuple is also documented. This commit also fixes an issue with the default value for the preferred protocols when using CONNECT over TLS. It was mistakenly not enabling http2 by default.
2019-09-22Initial support for Socks5Loïc Hoguin
2019-09-05Implement graceful shutdownLoïc Hoguin
The graceful shutdown is implemented through a new 'closing' state. This state is entered under different circumstances depending on the protocol. The gun:shutdown/1 function is now implemented and documented. It allows shutting down the connection gracefully regardless of the current state of the connection and for all protocols. The behavior is entirely dependent on the protocol. For HTTP/1.1 the connection stays up only until after the current stream is complete; other streams are immediately canceled. For HTTP/2 a GOAWAY frame is sent and existing streams continue to be processed. The connection is closed after all streams are processed and the server's GOAWAY frame is received. For Websocket a close frame is sent. The connection is closed when receiving the server's close frame. In all cases the closing_timeout option defines how long we wait, as a maximum, before closing the connection after the graceful shutdown was started. The graceful shutdown is also initiated when the owner process goes away; when sending an HTTP/1.1 request with the connection: close header; when receiving an HTTP/1.1 response with the connection: close header; when receiving an HTTP/1.0 response without a connection header; when the server sends a GOAWAY HTTP/2 frame; or when we send or receive a Websocket close frame. Along with these changes, the gun:ws_send/2 function now accepts a list of frames as argument. Those frames may include a close frame that initiates the graceful shutdown.