Continuing on from #51, this PR uses the existing close frame logic from the Protocol class to provide a close reason. The method (getCloseFrame()) was actually misnamed because it returns a Payload, ready for use.
Two other bugs fixed: we weren't masking, and in Connection: the Payload object was given to send() rather than the string buffer.
Continuing on from #51, this PR uses the existing close frame logic from the
Protocol
class to provide a close reason. The method (getCloseFrame()
) was actually misnamed because it returns aPayload
, ready for use.Two other bugs fixed: we weren't masking, and in
Connection
: thePayload
object was given tosend()
rather than the string buffer.