This PR adds support for sending control messages to Sessions. Previously, Melody's Close function would only close the connection without informing the websocket first. Now there is (optional) support for informing before close. This also includes the ability to be informed when the client is closing the connection and specifically with what code and error string. Finally, I ran Golint on everything and fixed where issues were found. It passes go vet without problems.
This PR adds support for sending control messages to Sessions. Previously, Melody's
Close
function would only close the connection without informing the websocket first. Now there is (optional) support for informing before close. This also includes the ability to be informed when the client is closing the connection and specifically with what code and error string. Finally, I ran Golint on everything and fixed where issues were found. It passesgo vet
without problems.