flux-tcp-io

flux-tcp-io —

Synopsis




#define     FLUX_TCP_IO                     (object)
struct      FluxTcpIO;
FluxTcpIO*  flux_tcp_io_new                 (void);
FluxTcpIO*  flux_tcp_io_new_with_socket     (GTcpSocket *socket);
FluxTcpIO*  flux_tcp_io_new_with_cipher     (FluxCipher *cipher);
FluxTcpIO*  flux_tcp_io_new_with_socket_and_cipher
                                            (GTcpSocket *socket,
                                             FluxCipher *cipher);
void        flux_tcp_io_init                (FluxTcpIO *tcp_io,
                                             GTcpSocket *socket,
                                             FluxCipher *cipher);
void        flux_tcp_io_finalize            (FluxObject *tcp_io);
void        flux_tcp_io_connect_begin       (FluxTcpIO *tcp_io,
                                             const gchar *host,
                                             guint port);
void        flux_tcp_io_disconnect          (FluxTcpIO *tcp_io);
void        flux_tcp_io_set_link_func       (FluxTcpIO *tcp_io,
                                             FluxTcpLinkFunc *func,
                                             gpointer data);
FluxCipher* flux_tcp_io_get_cipher          (FluxTcpIO *tcp_io);
void        flux_tcp_io_set_cipher          (FluxTcpIO *tcp_io,
                                             FluxCipher *cipher);
GTcpSocket* flux_tcp_io_get_socket          (FluxTcpIO *tcp_io);
FluxTcpIOState flux_tcp_io_get_state        (FluxTcpIO *tcp_io);
gint        flux_tcp_io_get_port            (FluxTcpIO *tcp_io);

Description

Details

FLUX_TCP_IO()

#define FLUX_TCP_IO(object) ((FluxTcpIO *) object)

object :

struct FluxTcpIO

struct FluxTcpIO {

  FluxIO                    io;

  FluxTcpIOState            state;
  GTcpSocket               *socket;
  FluxCipher               *cipher;

  GTcpSocketConnectAsyncID  connect_id;
  guint                     read_hup_watch_id;
  guint                     write_watch_id;

  /* Size of the cipher element we're currently waiting for. If zero,
   * the size itself is currently being read. */

  guint16                   cipher_element_size;

  guint                     have_write_watch            : 1,
                            have_read_hup_watch         : 1,
                            in_dispatch_loop            : 1,
                            reading_cipher_invitation   : 1,
                            reading_cipher_confirmation : 1;

  FluxTcpLinkFunc          *link_func;
  gpointer                  link_func_data;
};


flux_tcp_io_new ()

FluxTcpIO*  flux_tcp_io_new                 (void);

Returns :

flux_tcp_io_new_with_socket ()

FluxTcpIO*  flux_tcp_io_new_with_socket     (GTcpSocket *socket);

socket :
Returns :

flux_tcp_io_new_with_cipher ()

FluxTcpIO*  flux_tcp_io_new_with_cipher     (FluxCipher *cipher);

cipher :
Returns :

flux_tcp_io_new_with_socket_and_cipher ()

FluxTcpIO*  flux_tcp_io_new_with_socket_and_cipher
                                            (GTcpSocket *socket,
                                             FluxCipher *cipher);

socket :
cipher :
Returns :

flux_tcp_io_init ()

void        flux_tcp_io_init                (FluxTcpIO *tcp_io,
                                             GTcpSocket *socket,
                                             FluxCipher *cipher);

tcp_io :
socket :
cipher :

flux_tcp_io_finalize ()

void        flux_tcp_io_finalize            (FluxObject *tcp_io);

tcp_io :

flux_tcp_io_connect_begin ()

void        flux_tcp_io_connect_begin       (FluxTcpIO *tcp_io,
                                             const gchar *host,
                                             guint port);

tcp_io :
host :
port :

flux_tcp_io_disconnect ()

void        flux_tcp_io_disconnect          (FluxTcpIO *tcp_io);

tcp_io :

flux_tcp_io_set_link_func ()

void        flux_tcp_io_set_link_func       (FluxTcpIO *tcp_io,
                                             FluxTcpLinkFunc *func,
                                             gpointer data);

tcp_io :
func :
data :

flux_tcp_io_get_cipher ()

FluxCipher* flux_tcp_io_get_cipher          (FluxTcpIO *tcp_io);

tcp_io :
Returns :

flux_tcp_io_set_cipher ()

void        flux_tcp_io_set_cipher          (FluxTcpIO *tcp_io,
                                             FluxCipher *cipher);

tcp_io :
cipher :

flux_tcp_io_get_socket ()

GTcpSocket* flux_tcp_io_get_socket          (FluxTcpIO *tcp_io);

tcp_io :
Returns :

flux_tcp_io_get_state ()

FluxTcpIOState flux_tcp_io_get_state        (FluxTcpIO *tcp_io);

tcp_io :
Returns :

flux_tcp_io_get_port ()

gint        flux_tcp_io_get_port            (FluxTcpIO *tcp_io);

tcp_io :
Returns :