aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun.erl
AgeCommit message (Collapse)Author
2018-09-26Add the socket in the gun:info mapLoïc Hoguin
This is used by Cowboy for tests.
2018-09-26Keep track of the intermediaries the connection go throughLoïc Hoguin
Also augment the CONNECT tests to confirm that the intermediaries are accounted for.
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-17Add HTTP/1.1 CONNECT supportLoïc Hoguin
Gun can now be used to connect through TCP HTTP/1.1 proxies using all supported protocols. It is also possible to create a tunnel through multiple proxies. Also updates Cowlib to 2.6.0.
2018-08-06Fix some whitespaceLoïc Hoguin
2018-07-27Fix OTP 21 warningsLoïc Hoguin
2018-06-04Update copyright yearsLoï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-03Change messages to gun_upgrade and gun_ws with stream referenceLoïc Hoguin
2018-06-03Also flush trailersLoïc Hoguin
2018-06-03Fill in the options types instead of using map()Loïc Hoguin
2018-06-03Fix the inet:ip_address() typeLoïc Hoguin
2018-05-15Allow IP tuple for host #152Seudin Kasumovic
2018-01-22Add missing gun_inform clausesAndrei Nesterov
2017-12-16Add support for unix socketsmichael-coles
2017-12-14Change the {gone, Reason} to {shutdown, Reason} plus small fixesLoïc Hoguin
The reason for this change is to avoid annoying supervisor logs when SASL logging is enabled.
2017-11-15Add preliminary support for trailersLoïc Hoguin
The code is definitely not the best, but as long as it doesn't break anything it should be OK for now.
2017-10-29Add support for informational responsesLoïc Hoguin
2017-10-06Don't error out when the owner is gone normallyLoïc Hoguin
2017-08-14Allow an infinity keepalive value1.0.0-pre.4Loïc Hoguin
This disables the keepalive mechanism entirely.
2017-08-12Fix a warning preventing compilationLoïc Hoguin
2017-08-11Add missing Websocket clause detecting owner is goneLoïc Hoguin
2017-05-19Ensure the stacktrace is passed when crashingLoïc Hoguin
2017-05-01Add gun:info/11.0.0-pre.3Loïc Hoguin
So far only for getting the socket ip and port on the local side. More values may be added later on.
2017-05-01Add support for choosing a process to reply toAndrei Nesterov
2017-04-30Monitor owner and terminate when it diesJuan Facorro
2017-04-30Allow infinity for connect_timeoutLoïc Hoguin
2017-04-30Fix retry_timeout value checkLoïc Hoguin
2017-04-30Add connect timeoutsugus-seu
2017-04-30Ignore errors from Transport:setopts/2Yuki Ito
2017-04-30Propagate the last connection failure reasonLoïc Hoguin
Based on a patch by Pablo Polvorin. Thanks!
2017-04-30Fix the retry=0 case, add general gun test suiteLoïc Hoguin
2017-04-27Add content handlers and built-in SSE supportLoïc Hoguin
Content handlers are a chain of modules implementing callbacks that receive the body of responses and may modify it (for example for decompressing the content) or act upon it (like sending a message to the owner process. The gun_sse content handler module can be used to translate text/event-stream events on the fly and deliver them to the owner process as a {gun_sse...} message. This feature is currently not documented and is only tested against a public server. It requires an up to date Cowlib.
2017-01-02Implement HTTP/2 server pushLoïc Hoguin
2016-05-27Initial HTTP/2 supportLoïc Hoguin
A number of things are not implemented, but this is enough to connect to Twitter and get a response sent back. It also currently doesn't have tests.
2015-08-17Fix ssl:negotiated_next_protocol/1 is deprecated.Maxim Krentovskiy
2015-04-10Add headers to gun_ws_upgrade messageLoïc Hoguin
Also improves the code and documentation about this message. It was incorrectly specified that a gun_ws_upgrade message could be sent on error; instead a gun_response is sent.
2015-04-10Add Websocket optionsLoïc Hoguin
Allow passing Websocket options through either open or ws_upgrade. Document ws_upgrade/4.
2015-04-10Make Dialyzer happyLoïc Hoguin
2015-04-10Add functions await_up/{1,2,3} for sync openLoïc Hoguin
2015-04-09Add gun_up and gun_down messagesLoïc Hoguin
The flush(Pid) function was enhanced to also discard Websocket messages and the new up/down messages.
2015-04-09Fix checking of protocol optionsLoïc Hoguin
map:to_list -> maps:to_list Only call maps:to_list once.
2015-04-09Don't clear out the transport on connection retryLoïc Hoguin
Fixes an issue introduced in the previous commit that broke automatic reconnection. Thanks to Adrian Roe/Steve Strong for the report.
2015-04-08Use maps for and improve optionsLoïc Hoguin
The type option has been removed. The transport and protocols options can be used in its place. The transport_opts option can be used to specify transport options. The http_opts and spdy_opts options can be used to specify protocol specific options. The keepalive option is now a protocol specific option. Defaults depending on the port number have changed. Now only port 443 uses ssl by default, other ports use tcp.
2015-03-29Fixes badarg when using gun:ws_upgrade/{2,3}Loïc Hoguin
Websocket options are a map.
2015-03-25Fix the order of stream references in gun_push messageLoïc Hoguin
Should be simpler if the original stream reference is at the same position in all messages.
2015-03-12Update copyright yearsLoïc Hoguin
2015-03-12Add initial Websocket supportLoïc Hoguin
All autobahntestsuite tests pass including the permessage-deflate compression tests. Some of the tests pass in a non-strict fashion. They are testing for protocol errors and expect events to happen in a particular order, which is not respected by Gun. Gun fails earlier than is expected due to concurrent processing of frames. The implementation when error occurs during handshake is probably a bit rough at this point. The documentation is also incomplete and/or wrong at this time, though this is the general state of the Gun documentation and will be resolved in a separate commit.
2014-06-08continue after unexpected message for extend/gun#19Unix1
2014-06-08handle messages from previous socket for extend/gun#19Unix1