aboutsummaryrefslogtreecommitdiffstats
path: root/doc
AgeCommit message (Collapse)Author
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.
2019-08-05Add flow controlLoïc Hoguin
Flow control is disabled by default. The initial flow value must be set to enable it (either for the entire connection or on a per-request basis). Flow applies to all HTTP streams as well as Websocket. HTTP/2 pushed streams receive the same value as their originating stream.
2019-07-27Fix ssl and other typesLoïc Hoguin
2019-07-27Add the retry_fun option for different backoff strategiesLoïc Hoguin
2019-07-22Split domain lookup/connect/TLS handshake and add eventsLoïc Hoguin
This changes the way we connect to servers entirely. We now have three states when connecting (domain_lookup, connect and tls_handshake when applicable) and as a result three corresponding timeout options. Each state has a start/end event associated and the event data was tweaked to best match each event. Since the TLS handshake is separate, the transport_opts option was also split into two: tcp_opts and tls_opts.
2019-04-26Add upgrade/ws tuples to gun:await/2,3,4Loïc Hoguin
2019-04-26Add specs to await functions, document error type betterLoïc Hoguin
2019-04-26Document ssl's session_lifetime/session_cache_clients_maxLoïc Hoguin
2019-04-26Add the supervise option to start without supervisorLoïc Hoguin
2019-04-25Document an issue with OTP-20.3 on WindowsLoïc Hoguin
2019-01-09Improve documentation about gun:headers/4,5Loïc Hoguin
2019-01-09Add function gun:stream_info/2Loïc Hoguin
2019-01-06Lowercase header names automatically and accept more typesLoïc Hoguin
Header names can now be provided as binary, string or atom and Gun no longer requires them to be in lowercase. The list of headers can also be provided as a map as well.
2019-01-05Clarify option errors in the manual for gun:open/open_unixLoïc Hoguin
Also fix an http into http2 for one option.
2019-01-03Update copyright yearsLoïc Hoguin
2019-01-03Bump supported Erlang/OTP to 20.0+Loïc Hoguin
In particular the switch to gen_statem broke things with Erlang/OTP before 19.3.
2018-12-31Disable keepalive by default for HTTP/1.1Loïc Hoguin
This is safer as servers may reject too many extra empty lines.
2018-12-31Separate request/4,5,6 into headers/4,5 and request/5,6Loïc Hoguin
This cleaner separation gets rid of the implicit body check that was causing issues for many users. Now the body is either given explicitly or it is expected via future gun:data/3 calls.
2018-10-01Gun 1.3.01.3.0Loïc Hoguin
2018-10-01Document the protocols option for WebsocketMichal Piotrowski
2018-09-20Use ALPN when proxying TLS connections using CONNECTLoïc Hoguin
This fixes HTTP/2 over TLS connections. The protocol destination option has been deprecated in favor of a protocols option.
2018-09-17Gun 1.2.01.2.0Loïc Hoguin
2018-09-17Document gun:connect/2,3,4Loïc Hoguin
2018-08-06Gun 1.1.01.1.0Loïc Hoguin
2018-06-26Fix a mistake in the Websocket guideLoïc Hoguin
2018-06-11Fix await_up link in function reference docsRadu Ciorba
2018-06-04Review and update the user guideLoïc Hoguin
2018-06-04Remove the dependency on RanchLoïc Hoguin
We instead of two new modules, gun_tcp and gun_tls. They only have 6 functions so far, much less than what Ranch provided before. Also renames ssl to tls where applicable. It's still possible to use the ssl transport option but it's now undocumented.
2018-06-03Rename gun_data and gun_sse to gun_data_h and gun_sse_hLoïc Hoguin
2018-06-03Fill in the options types instead of using map()Loïc Hoguin
2018-06-03Add gun.sty to the user guideLoïc Hoguin
2018-06-02Revamp the manual, one page per function/messageLoïc Hoguin
2018-05-15Allow IP tuple for host #152Seudin Kasumovic
2018-05-07Make sure ws_upgrade/3 and /4 are considered differentLoïc Hoguin
2018-05-07Fix the document about `ws_upgrade`niku
2018-01-22Gun 1.0.0-pre.51.0.0-pre.5Loïc Hoguin
2017-08-14Allow an infinity keepalive value1.0.0-pre.4Loïc Hoguin
This disables the keepalive mechanism entirely.