Ignore:
Timestamp:
Aug 4, 2008 9:59:02 AM (16 years ago)
Author:
bennylp
Message:

Added new active socket API's to specify application buffers in start_read() and start_recv() functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/activesock.h

    r2185 r2187  
    357357 
    358358/** 
     359 * Same as #pj_activesock_start_read(), except that the application 
     360 * supplies the buffers for the read operation so that the acive socket 
     361 * does not have to allocate the buffers. 
     362 * 
     363 * @param asock     The active socket. 
     364 * @param pool      Pool used to allocate buffers for incoming data. 
     365 * @param buff_size The size of each buffer, in bytes. 
     366 * @param readbuf   Array of packet buffers, each has buff_size size. 
     367 * @param flags     Flags to be given to pj_ioqueue_recv(). 
     368 * 
     369 * @return          PJ_SUCCESS if the operation has been successful, 
     370 *                  or the appropriate error code on failure. 
     371 */ 
     372PJ_DECL(pj_status_t) pj_activesock_start_read2(pj_activesock_t *asock, 
     373                                               pj_pool_t *pool, 
     374                                               unsigned buff_size, 
     375                                               void *readbuf[], 
     376                                               pj_uint32_t flags); 
     377 
     378/** 
    359379 * Same as pj_activesock_start_read(), except that this function is used 
    360380 * only for datagram sockets, and it will trigger \a on_data_recvfrom() 
     
    373393                                                  unsigned buff_size, 
    374394                                                  pj_uint32_t flags); 
     395 
     396/** 
     397 * Same as #pj_activesock_start_recvfrom() except that the recvfrom()  
     398 * operation takes the buffer from the argument rather than creating 
     399 * new ones. 
     400 * 
     401 * @param asock     The active socket. 
     402 * @param pool      Pool used to allocate buffers for incoming data. 
     403 * @param buff_size The size of each buffer, in bytes. 
     404 * @param readbuf   Array of packet buffers, each has buff_size size. 
     405 * @param flags     Flags to be given to pj_ioqueue_recvfrom(). 
     406 * 
     407 * @return          PJ_SUCCESS if the operation has been successful, 
     408 *                  or the appropriate error code on failure. 
     409 */ 
     410PJ_DECL(pj_status_t) pj_activesock_start_recvfrom2(pj_activesock_t *asock, 
     411                                                   pj_pool_t *pool, 
     412                                                   unsigned buff_size, 
     413                                                   void *readbuf[], 
     414                                                   pj_uint32_t flags); 
    375415 
    376416/** 
Note: See TracChangeset for help on using the changeset viewer.