@@ 913-919 (lines=7) @@ | ||
910 | * @param integer $n Max. number of bytes to move |
|
911 | * @return integer|false |
|
912 | */ |
|
913 | public function moveToBuffer(\EventBuffer $dest, $n) |
|
914 | { |
|
915 | if (!isset($this->bev)) { |
|
916 | return false; |
|
917 | } |
|
918 | return $dest->appendFrom($this->bev->input, $n); |
|
919 | } |
|
920 | ||
921 | /** |
|
922 | * Moves arbitrary number of bytes from given buffer to output buffer |
|
@@ 927-934 (lines=8) @@ | ||
924 | * @param integer $n Max. number of bytes to move |
|
925 | * @return integer|false |
|
926 | */ |
|
927 | public function writeFromBuffer(\EventBuffer $src, $n) |
|
928 | { |
|
929 | if (!isset($this->bev)) { |
|
930 | return false; |
|
931 | } |
|
932 | $this->writing = true; |
|
933 | return $this->bev->output->appendFrom($src, $n); |
|
934 | } |
|
935 | ||
936 | /** |
|
937 | * Read data from the connection's buffer |