Main Page   File List   File Members   Related Pages  

frdi_net.h File Reference

function headers for frdi_net.c More...

Go to the source code of this file.

Functions

void frdiOpenListener ()
frdi_handler * frdiHandlerNew (char *arg_type, char *ret_type, char *name, void *handler_function)
void frdiHandlerFree (frdi_handler *handler)
void * frdiHandlerCall (frdi_handler *handler, void *arg)
frdi_link * frdiLinkNew (frdi_app *self)
void frdiLinkFree (frdi_app *self, frdi_link *link)
char * frdiLinkEncrypt (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkDecrypt (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkEncode (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkDecode (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkSign (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkCheck (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkIncoming (frdi_app *self, frdi_link *link, char *text)
char * frdiLinkOutgoing (frdi_app *self, frdi_link *link, char *text)
void frdiConnectionReceiverThreadLaunch (frdi_connection *connection)
void frdiConnectionSendMessage (frdi_connection *connection, frdi_message *message)
frdi_connection * frdiConnectionNew (frdi_app *self, frdi_handler *local, frdi_application *remote)
void frdiConnectionSetReceiver (frdi_connection *connection, frdi_handler *local)
void frdiConnectionFree (frdi_connection *connection)
void frdiConnectionConnect (frdi_connection *connection)
void frdiConnectionDisconnect (frdi_connection *connection)
int frdiConnectionIsOpen (frdi_connection *connection)
void frdiMessageSetConnection (frdi_message *message, frdi_connection *connection)
frdi_connection * frdiMessageGetConnection (frdi_message *message)
void frdiMessageSend (frdi_message *message)
void frdiMessageReceive (frdi_message *message)
frdi_message * frdiMessageNew (int size, void *data)
frdi_message * frdiMessageNewFromString (char *str)
void frdiMessageSetSize (frdi_message *message, int size)
void frdiMessageSetData (frdi_message *message, void *data)
void frdiMessageFree (frdi_message *message)
void * frdiMessageGetData (frdi_message *message)
int frdiMessageGetSize (frdi_message *message)
void frdiApplicationFree (frdi_application *application)
frdi_application * frdiApplicationNew (char *machine_name, char *machine_num, int port_number)
frdi_application * frdiApplicationNewFromString (char *str, int default_port_number)
char * frdiApplicationGetId (frdi_application *application)
char * frdiApplicationDisplay (frdi_application *application)
frdi_listener * frdiListenerNew (frdi_app *self, frdi_handler *spawner, int port_number)
void frdiListenerStart (frdi_listener *listener)
void frdiListenerStop (frdi_listener *listener)
void frdListenerFree (frdi_listener *listener)
char * frdiConnectionDescribe (frdi_connection *connection)
char * frdiNewRemoteMachineName (frdi_app *self, int socket_descriptor)
char * frdiDotFormToMachineName (frdi_app *self, char *dot_form)
char * frdiMachineNameToDotForm (frdi_app *self, char *machine_name)


Detailed Description

function headers for frdi_net.c

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

Function Documentation

void frdiOpenListener  
 

Start listening on a particular port

frdi_handler* frdiHandlerNew char *    arg_type,
char *    ret_type,
char *    name,
void *    handler_function
 

create a new handler

void frdiHandlerFree frdi_handler *    handler
 

free up a handler

void* frdiHandlerCall frdi_handler *    handler,
void *    arg
 

pass the argument to the function referred to by handler return the results

frdi_link* frdiLinkNew frdi_app *    self
 

Create the object

void frdiLinkFree frdi_app *    self,
frdi_link *    link
 

free up the object

char* frdiLinkEncrypt frdi_app *    self,
frdi_link *    link,
char *    text
 

encrypt

char* frdiLinkDecrypt frdi_app *    self,
frdi_link *    link,
char *    text
 

decrypt

char* frdiLinkEncode frdi_app *    self,
frdi_link *    link,
char *    text
 

encode

char* frdiLinkDecode frdi_app *    self,
frdi_link *    link,
char *    text
 

decode

char* frdiLinkSign frdi_app *    self,
frdi_link *    link,
char *    text
 

sign

char* frdiLinkCheck frdi_app *    self,
frdi_link *    link,
char *    text
 

ckeck signature and remove it

char* frdiLinkIncoming frdi_app *    self,
frdi_link *    link,
char *    text
 

decrypt, then remove signature then unencode, as needed

char* frdiLinkOutgoing frdi_app *    self,
frdi_link *    link,
char *    text
 

encode, then sign, then encrypt, as needed

void frdiConnectionReceiverThreadLaunch frdi_connection *    connection
 

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

void frdiConnectionSendMessage frdi_connection *    connection,
frdi_message *    message
 

send the message

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 frdiConnectionFree frdi_connection *    connection
 

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

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 frdiConnectionDisconnect frdi_connection *    connection
 

drop the connection

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

void frdiMessageSetConnection frdi_message *    message,
frdi_connection *    connection
 

associate a connection with a message

frdi_connection* frdiMessageGetConnection frdi_message *    message
 

get the connection associated with a message

void frdiMessageSend frdi_message *    message
 

send a message

void frdiMessageReceive frdi_message *    message
 

receive a message

frdi_message* frdiMessageNew int    size,
void *    data
 

obtain a message ready for use

frdi_message* frdiMessageNewFromString char *    str
 

fill frdiMessageNew from a null terminated char *

void frdiMessageSetSize frdi_message *    message,
int    size
 

helps create a message

void frdiMessageSetData frdi_message *    message,
void *    data
 

helps create a message

void frdiMessageFree frdi_message *    message
 

release a message for destruction / re-use

void* frdiMessageGetData frdi_message *    message
 

destroy a message

int frdiMessageGetSize frdi_message *    message
 

destroy a message

void frdiApplicationFree frdi_application *    application
 

free up the memory used by a frdi_application object

frdi_application* frdiApplicationNew char *    machine_name,
char *    machine_num,
int    port_number
 

the representation of the remote application connected to by a connection contains data like what ip number and port number it is on

frdi_application* frdiApplicationNewFromString char *    str,
int    default_port_number
 

takes a string of form "foo", "foo:123", "192.168.23.17", "192.168.23.17:123"

char* frdiApplicationGetId frdi_application *    application
 

return foo:123

char* frdiApplicationDisplay frdi_application *    application
 

describe an application object

frdi_listener* frdiListenerNew frdi_app *    self,
frdi_handler *    spawner,
int    port_number
 

create a new listener object

void frdiListenerStart frdi_listener *    listener
 

start listening

void frdiListenerStop frdi_listener *    listener
 

stop listening

void frdListenerFree frdi_listener *    listener
 

free up memory

char* frdiConnectionDescribe frdi_connection *    connection
 

Describe a socket

char* frdiNewRemoteMachineName frdi_app *    self,
int    socket_descriptor
 

derive the dot form char string from the socket descriptor

char* frdiDotFormToMachineName frdi_app *    self,
char *    dot_form
 

convert from a machine name to the dot form

char* frdiMachineNameToDotForm frdi_app *    self,
char *    machine_name
 

convert from the dot form to a machine name


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