- s->tx_waiter = NULL;
-}
-
-static void
-stream_do_tx(int fd UNUSED, short int revents UNUSED, void *vconn_)
-{
- struct vconn *vconn = vconn_;
- struct stream_vconn *s = stream_vconn_cast(vconn);
- ssize_t n = write(s->fd, s->txbuf->data, s->txbuf->size);
- if (n < 0) {
- if (errno != EAGAIN) {
- VLOG_ERR_RL(&rl, "send: %s", strerror(errno));
- stream_clear_txbuf(s);
- return;
- }
- } else if (n > 0) {
- ofpbuf_pull(s->txbuf, n);
- if (!s->txbuf->size) {
- stream_clear_txbuf(s);
- return;
- }
- }
- s->tx_waiter = poll_fd_callback(s->fd, POLLOUT, stream_do_tx, vconn);