diff --git a/Version/RFC6455/Connection.php b/Version/RFC6455/Connection.php index c1c3f7c..acd5bb6 100644 --- a/Version/RFC6455/Connection.php +++ b/Version/RFC6455/Connection.php @@ -23,7 +23,7 @@ class Connection extends AbstractConnectionDecorator { if ($code instanceof DataInterface) { $this->send($code); } else { - $this->send(new Frame(Frame::encode(sprintf('%016b', $code)), true, Frame::OP_CLOSE)); + $this->send(new Frame(pack('n', $code), true, Frame::OP_CLOSE)); } $this->getConnection()->close();