Changeset 4860 for pjproject/trunk/pjlib/include/pj/sock.h
- Timestamp:
- Jun 19, 2014 5:07:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/sock.h
r4538 r4860 617 617 } pj_ip_mreq; 618 618 619 /* Maximum number of socket options. */ 620 #define PJ_MAX_SOCKOPT_PARAMS 4 621 622 /** 623 * Options to be set for the socket. 624 */ 625 typedef struct pj_sockopt_params 626 { 627 /* The number of options to be applied. */ 628 unsigned cnt; 629 630 /* Array of options to be applied. */ 631 struct { 632 /* The level at which the option is defined. */ 633 int level; 634 635 /* Option name. */ 636 int optname; 637 638 /* Pointer to the buffer in which the option is specified. */ 639 void *optval; 640 641 /* Buffer size of the buffer pointed by optval. */ 642 int optlen; 643 } options[PJ_MAX_SOCKOPT_PARAMS]; 644 } pj_sockopt_params; 619 645 620 646 /***************************************************************************** … … 1306 1332 int optlen); 1307 1333 1334 /** 1335 * Set socket options associated with a socket. This method will apply all the 1336 * options specified, and ignore any errors that might be raised. 1337 * 1338 * @param sockfd The socket descriptor. 1339 * @param params The socket options. 1340 * 1341 * @return PJ_SUCCESS or the last error code. 1342 */ 1343 PJ_DECL(pj_status_t) pj_sock_setsockopt_params( pj_sock_t sockfd, 1344 const pj_sockopt_params *params); 1308 1345 1309 1346 /**
Note: See TracChangeset
for help on using the changeset viewer.