Main Page   File List   File Members   Related Pages  

frdi_net_connection.c File Reference

the connection object More...

#include "frdi.h"

Functions

frdi_connection * frdiConnectionNew (frdi_app *self, frdi_handler *local, frdi_application *remote)
void frdiConnectionSetReceiver (frdi_connection *connection, frdi_handler *local)
void frdiConnectionConnect (frdi_connection *connection)
void frdiConnectionReceiverProcess (frdi_connection *connection)
void frdiConnectionReceiverThreadRun (frdi_connection *connection)
void frdiConnectionReceiverThreadLaunch (frdi_connection *connection)
void frdiConnectionDisconnect (frdi_connection *connection)
void frdiConnectionFree (frdi_connection *connection)
void frdiIntToPaddedHex (int i, char size_str[FRDI_MESSAGE_SIZE_HEX_LEN])
void frdiConnectionSendMessage (frdi_connection *connection, frdi_message *message)
int frdiConnectionIsOpen (frdi_connection *connection)


Detailed Description

the connection object

Author:
Douglas Reay <douglas-legal@reay.org>
Warning:

Function Documentation

frdi_connection* frdiConnectionNew frdi_app *    self,
frdi_handler *    local,
frdi_application *    remote
 

create a new data connection object (NOT A LISTENER) NOTE: this does not do the actual connection.

void frdiConnectionSetReceiver frdi_connection *    connection,
frdi_handler *    local
 

used by Listener

void frdiConnectionConnect frdi_connection *    connection
 

try to connect if it fails, it will tell your handler so Note, in the case of a connection spawned by the listener end, this method will not be called.

void frdiConnectionReceiverProcess frdi_connection *    connection
 

receive one message's worth of data

void frdiConnectionReceiverThreadRun frdi_connection *    connection
 

See THREAD CREATION PATTERN

void frdiConnectionReceiverThreadLaunch frdi_connection *    connection
 

Start receiving data on the connection (See THREAD CREATION PATTERN)

void frdiConnectionDisconnect frdi_connection *    connection
 

drop the connection

void frdiConnectionFree frdi_connection *    connection
 

free up the memory used by a frdi_connection object the connection it represents MUST already be closed

void frdiIntToPaddedHex int    i,
char    size_str[FRDI_MESSAGE_SIZE_HEX_LEN]
 

convert an into to HHHH

void frdiConnectionSendMessage frdi_connection *    connection,
frdi_message *    message
 

send the message

int frdiConnectionIsOpen frdi_connection *    connection
 

Returns 1 if the connection is opening Returns 0 if it is not or is in the process of closing


Generated on Wed Aug 18 13:24:02 2004 for Project Fairdice by doxygen1.2.18