private function send($payload) { $msg = $payload . "\r\n"; fwrite($this->streamSocket, $msg, strlen($msg)); }