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