… | |
… | |
132 | do operations on the file handle you cannot do using the Coro::Handle |
132 | do operations on the file handle you cannot do using the Coro::Handle |
133 | interface. |
133 | interface. |
134 | |
134 | |
135 | =item $fh->rbuf |
135 | =item $fh->rbuf |
136 | |
136 | |
137 | Returns the current contents of the raed buffer (this is an lvalue, so you |
137 | Returns the current contents of the read buffer (this is an lvalue, so you |
138 | can change the read buffer if you like). |
138 | can change the read buffer if you like). |
139 | |
139 | |
140 | You can use this fucntion to implement your own optimized reader when neither |
140 | You can use this function to implement your own optimized reader when neither |
141 | readline nor sysread are viable candidates, like this: |
141 | readline nor sysread are viable candidates, like this: |
142 | |
142 | |
143 | # first get the _real_ non-blocking filehandle |
143 | # first get the _real_ non-blocking filehandle |
144 | # and fetch the current contents of the read buffer |
144 | # and fetch the current contents of the read buffer |
145 | my $nb_fh = $fh->fh; |
145 | my $nb_fh = $fh->fh; |