varspool / Wrench

A simple PHP WebSocket implementation for PHP 7.1
Do What The F*ck You Want To Public License
596 stars 210 forks source link

Add client close frame #67

Closed dominics closed 9 years ago

dominics commented 9 years ago

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.

Alarmfifa commented 9 years ago

wow, thanks, @dominics !!! =)