(
&self,
fd: wasip1::Fd,
iovs: wasip1::CiovecArray<'_>,
)
| 252 | } |
| 253 | |
| 254 | pub unsafe fn write( |
| 255 | &self, |
| 256 | fd: wasip1::Fd, |
| 257 | iovs: wasip1::CiovecArray<'_>, |
| 258 | ) -> Result<wasip1::Size, wasip1::Errno> { |
| 259 | loop { |
| 260 | match (self, unsafe { wasip1::fd_write(fd, iovs) }) { |
| 261 | (BlockingMode::NonBlocking, Err(wasip1::ERRNO_AGAIN)) => { |
| 262 | Self::poll(fd, wasip1::EVENTTYPE_FD_WRITE)?; |
| 263 | } |
| 264 | (_, result) => break result, |
| 265 | } |
| 266 | } |
| 267 | } |
| 268 | } |