diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-07-29 20:15:15 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-07-29 20:15:15 +0000 |
commit | 8fbda606f3e71e9d0d8b3ae6571db408b9dae48d (patch) | |
tree | 15d7a447e0c07752619e0d74332c59401fc50199 /pjlib/include | |
parent | 02e33827d8cd91329007d2d2009965222d56ba53 (diff) |
Initial work for ticket #579: added option to make the active socket sends all the (TCP) data before calling completion callback
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2185 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include')
-rw-r--r-- | pjlib/include/pj/activesock.h | 15 | ||||
-rw-r--r-- | pjlib/include/pj/ioqueue.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pjlib/include/pj/activesock.h b/pjlib/include/pj/activesock.h index dd5d8270..f465de83 100644 --- a/pjlib/include/pj/activesock.h +++ b/pjlib/include/pj/activesock.h @@ -201,6 +201,21 @@ typedef struct pj_activesock_cfg */ int concurrency; + /** + * If this option is specified, the active socket will make sure that + * asynchronous send operation with stream oriented socket will only + * call the callback after all data has been sent. This means that the + * active socket will automatically resend the remaining data until + * all data has been sent. + * + * Please note that when this option is specified, it is possible that + * error is reported after partial data has been sent. Also setting + * this will disable the ioqueue concurrency for the socket. + * + * Default value is 1. + */ + pj_bool_t whole_data; + } pj_activesock_cfg; diff --git a/pjlib/include/pj/ioqueue.h b/pjlib/include/pj/ioqueue.h index d8df170e..8cfc090c 100644 --- a/pjlib/include/pj/ioqueue.h +++ b/pjlib/include/pj/ioqueue.h @@ -208,6 +208,7 @@ PJ_BEGIN_DECL typedef struct pj_ioqueue_op_key_t { void *internal__[32]; /**< Internal I/O Queue data. */ + void *activesock_data; /**< Active socket data. */ void *user_data; /**< Application data. */ } pj_ioqueue_op_key_t; |