Write data to PTY
(&self, data: &[u8])
| 2454 | impl PTYSession { |
| 2455 | /// Write data to PTY |
| 2456 | pub async fn write(&self, data: &[u8]) -> anyhow::Result<()> { |
| 2457 | let channel = self.channel.lock().await; |
| 2458 | channel |
| 2459 | .data(data) |
| 2460 | .await |
| 2461 | .map_err(|e| anyhow!("Failed to write to PTY: {}", e))?; |
| 2462 | Ok(()) |
| 2463 | } |
| 2464 | |
| 2465 | /// Resize PTY |
| 2466 | pub async fn resize(&self, cols: u32, rows: u32) -> anyhow::Result<()> { |
no test coverage detected