/** * Make socket connection to the server * We also set the stream to non-blocking mode, since we'll be * select'ing to wait for updates. In blocking mode it seems * to get confused sometimes. * * @throws StompException */ protected function _makeConnection() { parent::_makeConnection(); stream_set_blocking($this->_socket, 0); }