Socket Struct Reference

A connection of some sort. More...

#include <socket.h>

Collaboration diagram for Socket:

Collaboration graph
[legend]

Data Fields

const SockVTABvtab
Socket_Type type
char label [32]
uint32 id
SOCKET socket
mstime created
mstime lastmsg
mstime timeout
struct Socketactive_next
uint8 * pOutput
RingBuff output
uint8 * pInput
RingBuff input
uint8 * pAppHeap
ctl_heap appheap
void(* appReceived )(struct Socket *sock, ctl_serial *serial)
 Application callback for packet received.
void(* appDisconnect )(struct Socket *sock)
 Application callback for socket closed.

Detailed Description

A connection of some sort.

Definition at line 84 of file socket.h.


Field Documentation

Virtual function table - what to do with this

Definition at line 86 of file socket.h.

Referenced by Socket_Close(), Socket_Create_Client(), Socket_Create_Listener(), Socket_Create_Login(), Socket_Create_Raw(), and Socket_Create_User().

char Socket::label[32]

uint32 Socket::id

Socket ID; index of socket and sequence number

Definition at line 89 of file socket.h.

Referenced by Socket_Close(), Socket_Create(), SocketID(), and SocketLut().

Actual socket handle

Definition at line 90 of file socket.h.

Referenced by Socket_Close(), Socket_Create(), Socket_Create_Listener(), and Socket_Create_Login().

When this was created

Definition at line 91 of file socket.h.

Referenced by Socket_Create().

Last message received

Definition at line 92 of file socket.h.

Referenced by Socket_Create().

How long to wait before closing an inactive connection, or 0

Definition at line 93 of file socket.h.

Referenced by Socket_Create(), Socket_Create_Client(), Socket_Create_Listener(), Socket_Create_Login(), Socket_Create_Raw(), and Socket_Create_User().

struct Socket* Socket::active_next [read]

List of active sockets

Definition at line 94 of file socket.h.

Output buffer memory

Definition at line 113 of file socket.h.

Referenced by Socket_Customize().

RingBuff Socket::output

Output buffer

Definition at line 114 of file socket.h.

Referenced by Socket_Alloc_Serial(), Socket_Customize(), Socket_Write(), and Socket_Write_Serial().

Input buffer memory

Definition at line 121 of file socket.h.

Referenced by Socket_Customize().

RingBuff Socket::input

Input buffer

Definition at line 122 of file socket.h.

Referenced by Socket_Customize(), and Socket_Raw_Consume().

Input buffer memory

Definition at line 127 of file socket.h.

Referenced by Socket_Customize().

A heap for application to stuff things into this

Definition at line 128 of file socket.h.

Referenced by Socket_Customize().

void(* Socket::appReceived)(struct Socket *sock, ctl_serial *serial)

Application callback for packet received.

Parameters:
sock This instance
serial Serial data containing the packet; rewind it for the length or to re-use (broadcast) it

Referenced by Socket_Close(), and Socket_Create().

void(* Socket::appDisconnect)(struct Socket *sock)

Application callback for socket closed.

Parameters:
sock This instance

Referenced by Socket_Close(), and Socket_Create().


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

Generated on Fri Jan 2 15:28:37 2009 for Squat by  doxygen 1.5.6