From 98749925c769b44f353bb1d406c08638c20c36c1 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 22 Oct 2015 12:24:34 +0300 Subject: [PATCH] Pass length into ReadInternal --- SourceQuery/BaseSocket.php | 2 +- SourceQuery/Socket.php | 2 +- Tests/Tests.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SourceQuery/BaseSocket.php b/SourceQuery/BaseSocket.php index ce19744..cb4ccc7 100644 --- a/SourceQuery/BaseSocket.php +++ b/SourceQuery/BaseSocket.php @@ -40,7 +40,7 @@ abstract public function Write( $Header, $String = '' ); abstract public function Read( $Length = 1400 ); - protected function ReadInternal( $Buffer, $SherlockFunction ) + protected function ReadInternal( $Buffer, $Length, $SherlockFunction ) { if( $Buffer->Remaining( ) === 0 ) { diff --git a/SourceQuery/Socket.php b/SourceQuery/Socket.php index 5ceb21d..9780e72 100644 --- a/SourceQuery/Socket.php +++ b/SourceQuery/Socket.php @@ -73,7 +73,7 @@ $Buffer = new Buffer( ); $Buffer->Set( FRead( $this->Socket, $Length ) ); - $this->ReadInternal( $Buffer, [ $this, 'Sherlock' ] ); + $this->ReadInternal( $Buffer, $Length, [ $this, 'Sherlock' ] ); return $Buffer; } diff --git a/Tests/Tests.php b/Tests/Tests.php index de983fb..ab4b4f4 100644 --- a/Tests/Tests.php +++ b/Tests/Tests.php @@ -40,7 +40,7 @@ $Buffer = new Buffer( ); $Buffer->Set( $this->PacketQueue->pop() ); - $this->ReadInternal( $Buffer, [ $this, 'Sherlock' ] ); + $this->ReadInternal( $Buffer, $Length, [ $this, 'Sherlock' ] ); return $Buffer; }