- Moved all the
WebSockex.Clientmodule functionality into the baseWebSockexmodule. - Roll
handle_connect_failurefunctionality intohandle_disconnect. - Roll
initfunctionality intohandle_connect
- Roll
initfunctionality intohandle_connecthandle_connectwill be invoked upon establishing any connection, i.e., the intial connection and when reconnecting.- The
initcallback is removed entirely.
- Moved all the
WebSockex.Clientmodule functionality into the baseWebSockexmodule.- Changed the
Applicationmodule toWebSockex.Application.
- Changed the
- Add
WebSockex.startfor non-linked processes. - Add
asyncoption tostartandstart_link. - Roll
handle_connect_failurefunctionality intohandle_disconnect.- The first parameter of
handle_disconnectis now a map with the keys::reason,:conn, and:attempt_number. handle_disconnectnow has another return option for when wanted to reconnect with different URI options or headers:{:reconnect, new_conn, new_state}- Added the
:handle_initial_conn_failureoption to the options forstartandstart_linkthat will allowhandle_disconnectto be called if we can establish a connection during those functions. - Removed
handle_connect_failureentirely.
- The first parameter of
Client.start_linkwill no longer cause the calling process to exit on connection failure and will return a proper error tuple instead.- Change
WebSockex.Conn.RequestErrortoWebSockex.RequestError. - Add
handle_connect_failureto be invoked after initiating a connection fails. Fixes #5
- Rework how disconnects are handled which should improve the
handle_disconnectcallback reliability.