PurpleSslOps Struct Reference

SSL implementation operations structure. More...

#include <sslconn.h>


Data Fields

void(* _purple_reserved1 )(void)
void(* _purple_reserved2 )(void)
void(* _purple_reserved3 )(void)
void(* _purple_reserved4 )(void)
void(* close )(PurpleSslConnection *gsc)
 Destroys the internal data of the SSL connection provided.
void(* connectfunc )(PurpleSslConnection *gsc)
 Sets up the SSL connection for a PurpleSslConnection once the TCP connection has been established.
gboolean(* init )(void)
 Initializes the SSL system provided.
size_t(* read )(PurpleSslConnection *gsc, void *data, size_t len)
 Reads data from a connection (like POSIX read()).
void(* uninit )(void)
 Unloads the SSL system.
size_t(* write )(PurpleSslConnection *gsc, const void *data, size_t len)
 Writes data to a connection (like POSIX send()).


Detailed Description

SSL implementation operations structure.

Every SSL implementation must provide all of these and register it via purple_ssl_set_ops() These should not be called directly! Instead, use the purple_ssl_* functions.

Definition at line 80 of file sslconn.h.


Field Documentation

void(* PurpleSslOps::close)(PurpleSslConnection *gsc)

Destroys the internal data of the SSL connection provided.

Freeing gsc itself is left to purple_ssl_close()

gboolean(* PurpleSslOps::init)(void)

Initializes the SSL system provided.

Returns:
TRUE if initialization succeeded

size_t(* PurpleSslOps::read)(PurpleSslConnection *gsc, void *data, size_t len)

Reads data from a connection (like POSIX read()).

Parameters:
gsc Connection context
data Pointer to buffer to drop data into
len Maximum number of bytes to read
Returns:
Number of bytes actually written into the buffer, or <0 on error

void(* PurpleSslOps::uninit)(void)

Unloads the SSL system.

Inverse of init.

size_t(* PurpleSslOps::write)(PurpleSslConnection *gsc, const void *data, size_t len)

Writes data to a connection (like POSIX send()).

Parameters:
gsc Connection context
data Data buffer to send data from
len Number of bytes to send from buffer
Returns:
The number of bytes written (may be less than len) or <0 on error


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