-void
-vl_socket_add_pending_output (clib_file_t * uf,
- vl_api_registration_t * rp,
- u8 * buffer, uword buffer_bytes)
-{
- clib_file_main_t *fm = &file_main;
-
- vec_add (rp->output_vector, buffer, buffer_bytes);
- if (vec_len (rp->output_vector) > 0)
- {
- int skip_update = 0 != (uf->flags & UNIX_FILE_DATA_AVAILABLE_TO_WRITE);
- uf->flags |= UNIX_FILE_DATA_AVAILABLE_TO_WRITE;
- if (!skip_update)
- fm->file_update (uf, UNIX_FILE_UPDATE_MODIFY);
- }
-}
-
-void
-vl_socket_add_pending_output_no_flush (clib_file_t * uf,
- vl_api_registration_t * rp,
- u8 * buffer, uword buffer_bytes)
-{
- vec_add (rp->output_vector, buffer, buffer_bytes);
-}
-
-static void
-socket_del_pending_output (clib_file_t * uf,
- vl_api_registration_t * rp, uword n_bytes)
-{
- clib_file_main_t *fm = &file_main;
-
- vec_delete (rp->output_vector, n_bytes, 0);
- if (vec_len (rp->output_vector) <= 0)
- {
- int skip_update = 0 == (uf->flags & UNIX_FILE_DATA_AVAILABLE_TO_WRITE);
- uf->flags &= ~UNIX_FILE_DATA_AVAILABLE_TO_WRITE;
- if (!skip_update)
- fm->file_update (uf, UNIX_FILE_UPDATE_MODIFY);
- }
-}
-