1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-06-08 01:46:00 +02:00

Abstract away Socket.Read

This commit is contained in:
xPaw
2015-04-27 22:42:32 +03:00
parent 45f5f422b4
commit 0e55dddae8
+6 -1
View File
@@ -70,7 +70,12 @@
public function Read( $Length = 1400 ) public function Read( $Length = 1400 )
{ {
$this->Buffer->Set( FRead( $this->Socket, $Length ) ); $this->ReadBuffer( FRead( $this->Socket, $Length ), $Length );
}
protected function ReadBuffer( $Buffer, $Length )
{
$this->Buffer->Set( $Buffer );
if( $this->Buffer->Remaining( ) === 0 ) if( $this->Buffer->Remaining( ) === 0 )
{ {