Skip to content

Commit 0e55ddd

Browse files
committed
Abstract away Socket.Read
1 parent 45f5f42 commit 0e55ddd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SourceQuery/Socket.class.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ public function Write( $Header, $String = '' )
7070

7171
public function Read( $Length = 1400 )
7272
{
73-
$this->Buffer->Set( FRead( $this->Socket, $Length ) );
73+
$this->ReadBuffer( FRead( $this->Socket, $Length ), $Length );
74+
}
75+
76+
protected function ReadBuffer( $Buffer, $Length )
77+
{
78+
$this->Buffer->Set( $Buffer );
7479

7580
if( $this->Buffer->Remaining( ) === 0 )
7681
{

0 commit comments

Comments
 (0)