BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

pj_ssl_sock_param Struct Reference
[Secure socket I/O]

Data Fields

int sock_af
int sock_type
pj_ioqueue_tioqueue
pj_timer_heap_ttimer_heap
pj_ssl_sock_cb cb
void * user_data
pj_ssl_sock_proto proto
unsigned async_cnt
int concurrency
pj_bool_t whole_data
pj_size_t send_buffer_size
pj_size_t read_buffer_size
unsigned ciphers_num
pj_ssl_cipherciphers
pj_time_val timeout
pj_bool_t verify_peer
pj_bool_t require_client_cert
pj_str_t server_name
pj_qos_type qos_type
pj_qos_params qos_params
pj_bool_t qos_ignore_error

Detailed Description

Definition of secure socket creation parameters.


Field Documentation

Number of concurrent asynchronous operations that is to be supported by the secure socket. This value only affects socket receive and accept operations -- the secure 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.

Specify secure socket callbacks, see pj_ssl_sock_cb.

Ciphers and order preference. If empty, then default cipher list and its default order of the backend will be used.

Number of ciphers contained in the specified cipher preference. If this is set to zero, then default cipher list of the backend will be used.

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 secure socket will disable concurrency for the socket. When this value is +1, the secure socket will enable concurrency for the socket.

The default value is -1.

Specify the ioqueue to use. Secure socket uses the ioqueue to perform active socket operations, see Active socket I/O for more detail.

Specify security protocol to use, see pj_ssl_sock_proto.

Default is PJ_SSL_SOCK_PROTO_DEFAULT.

Specify if the transport should ignore any errors when setting the QoS traffic type/parameters.

Default: PJ_TRUE

Set the low level QoS parameters to the transport. This is a lower level operation than setting the qos_type field and may not be supported on all platforms.

By default all settings in this structure are disabled.

QoS traffic type to be set on this transport. When application wants to apply QoS tagging to the transport, it's preferable to set this field rather than qos_param fields since this is more portable.

Default value is PJ_QOS_TYPE_BEST_EFFORT.

Specify buffer size for receiving encrypted (and perhaps compressed) data on underlying socket. This setting is unused on Symbian, since SSL/TLS Symbian backend, CSecureSocket, can use application buffer directly.

Default value is 1500.

When secure socket is acting as server (handles incoming connection), it will require the client to provide certificate.

Default value is PJ_FALSE.

Specify buffer size for sending operation. Buffering sending data is used for allowing application to perform multiple outstanding send operations. Whenever application specifies this setting too small, sending operation may return PJ_ENOMEM.

Default value is 8192 bytes.

Server name indication. When secure socket is acting as client (perform outgoing connection) and the server may host multiple 'virtual' servers at a single underlying network address, setting this will allow client to tell the server a name of the server it is contacting.

Default value is zero/not-set.

Specifies socket address family, either pj_AF_INET() and pj_AF_INET6().

Default is pj_AF_INET().

Specify socket type, either pj_SOCK_DGRAM() or pj_SOCK_STREAM().

Default is pj_SOCK_STREAM().

Security negotiation timeout. If this is set to zero (both sec and msec), the negotiation doesn't have a timeout.

Default value is zero.

Specify the timer heap to use. Secure socket uses the timer to provide auto cancelation on asynchronous operation when it takes longer time than specified timeout period, e.g: security negotiation timeout.

Specify secure socket user data.

Specify whether endpoint should verify peer certificate.

Default value is PJ_FALSE.

If this option is specified, the secure 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 secure 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.