BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

pj_activesock_cfg Struct Reference
[Active socket I/O]

Data Fields

unsigned async_cnt
int concurrency
pj_bool_t whole_data

Detailed Description

Settings that can be given during active socket creation. Application must initialize this structure with pj_activesock_cfg_default().


Field Documentation

Number of concurrent asynchronous operations that is to be supported by the active socket. This value only affects socket receive and accept operations -- the active socket will issue one or more asynchronous read and accept operations based on the value of this field. Setting this field to more than one will allow more than one incoming data or incoming connections to be processed simultaneously on multiprocessor systems, when the ioqueue is polled by more than one threads.

The default value is 1.

The ioqueue concurrency to be forced on the socket when it is registered to the ioqueue. See pj_ioqueue_set_concurrency() for more info about ioqueue concurrency.

When this value is -1, the concurrency setting will not be forced for this socket, and the socket will inherit the concurrency setting of the ioqueue. When this value is zero, the active socket will disable concurrency for the socket. When this value is +1, the active socket will enable concurrency for the socket.

The default value is -1.

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.


The documentation for this struct was generated from the following file:

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.