namespace Coral
|
Port number. More... |
|
|
Public Types
Public Methods
- void installBreakDetector ()
- void uninstallBreakDetector ()
- bool breakDetected ()
- void sendBreak (const bool quiet = false)
- inline ostream& operator<< (ostream& os, const SocketAddress& sa)
- inline void debug (const char* string)
- inline card64 getMicroTime ()
- inline card16 translate16 (const card16 x)
- inline card32 translate32 (const card32 x)
- inline card64 translate64 (const card64 x)
- inline card64 translateToBinary (const double x)
- inline double translateToDouble (const card64 x)
- cardinal calculatePacketsPerSecond (const cardinal payloadBytesPerSecond,
const cardinal framesPerSecond,
const cardinal maxPacketSize,
const cardinal headerLength)
- cardinal calculateBytesPerSecond (const cardinal payloadBytesPerSecond,
const cardinal framesPerSecond,
const cardinal maxPacketSize,
const cardinal headerLength)
- bool scanURL (const String& location,
String& protocol,
String& host,
String& path)
- bool getUserName (char* str, const size_t size, const uid_t uid = getuid())
- template<class T> void quickSort (T* array,
const integer start,
const integer end)
- template<class T> cardinal removeDuplicates (T* array,
const cardinal length)
- void printTimeStamp (ostream& os = cout)
Public Members
Port number.
void installBreakDetector ()
| installBreakDetector |
Install break handler.
void uninstallBreakDetector ()
| uninstallBreakDetector |
Uninstall break handler.
bool breakDetected ()
| breakDetected |
Check, if break has been detected.
void sendBreak (const bool quiet = false)
| sendBreak |
Send break to main thread.
Parameters:
quiet | true to print no break message in breakDetected(), false otherwise (default).
|
Condition (class) | Condition |
This class realizes a condition variable.
See also: Synchronizable, Thread
InternetAddress (class) | InternetAddress |
This class manages an internet address.
InternetFlow (class) | InternetFlow |
This class inherits InternetAddress and contains an additional flow label
for IPv6 support.
PortableAddress (class) | PortableAddress |
Binary representation for a socket address for sending the address over
a network. The difference between InternetAddress is that PortableAddress
does not contain hidden information on virtual function management, which
make network transfer of InternetAddress objects problematic.
Randomizer (class) | Randomizer |
This class is an randomizer. The randomizer algorithm will calculate
random numbers with seed given by system timer (microseconds since
January 01, 1970) or given by a number.
SCTPAssociation (class) | SCTPAssociation |
This class manages a SCTP assocation. Note: The constructor is protected,
a SCTP assocation can be created from an SCTP socket using associate() or
accept().
See also: SCTPSocket, SCTPSocket#associate, SCTPSocket#accept
AssociationStatus (struct) | AssociationStatus |
Association status.
AssociationControlData (struct) | AssociationControlData |
Association control data.
ChunkArrivalQueue (class) | ChunkArrivalQueue |
This class is a queue for SCTP Data Arrive notification data.
SCTPConnectionlessSocket (class) | SCTPConnectionlessSocket |
This class manages a connectionless (UDP-style) SCTP socket. Internally,
this class automatically establishs or accepts new SCTP associations.
SCTPSocket (class) | SCTPSocket |
This class manages a SCTP socket (SCTP instance).
SCTPSocketMaster (class) | SCTPSocketMaster |
This class manages the interaction between the SCTP Socket class and the
userland SCTP implementation. It is implemented as a singleton and
automatically instantiated at program startup.
SocketAddress (class) | SocketAddress |
This class is an interface for a socket address.
inline ostream& operator<< (ostream& os, const SocketAddress& sa)
| operator<< |
Output operator.
set<Synchronizable*> Synchronizable::MutexSet
| Synchronizable::MutexSet |
set<Thread*> Thread::ThreadSet
| Thread::ThreadSet |
bool Thread::syncDebuggerChecked
| Thread::syncDebuggerChecked |
bool InternetAddress::UseIPv6
| InternetAddress::UseIPv6 |
int SCTPSocketMaster::InitializationResult
| SCTPSocketMaster::InitializationResult |
cardinal SCTPSocketMaster::LockLevel
| SCTPSocketMaster::LockLevel |
cardinal SCTPSocketMaster::OldCancelState
| SCTPSocketMaster::OldCancelState |
card64 SCTPSocketMaster::LastGarbageCollection
| SCTPSocketMaster::LastGarbageCollection |
set<unsigned short> SCTPSocketMaster::ClosingSockets
| SCTPSocketMaster::ClosingSockets |
multimap<unsigned int, unsigned short> SCTPSocketMaster::ClosingAssociations
| SCTPSocketMaster::ClosingAssociations |
multimap<unsigned short, SCTPSocket*> SCTPSocketMaster::SCTPSocketList
| SCTPSocketMaster::SCTPSocketList |
SCTP_ulpCallbacks SCTPSocketMaster::SCTPCallbacks
| SCTPSocketMaster::SCTPCallbacks |
SCTPSocketMaster SCTPSocketMaster::MasterInstance
| SCTPSocketMaster::MasterInstance |
Synchronizable (class) | Synchronizable |
This class realizes synchronized access to a thread's data by other threads.
Synchronization is done by using a global pthread mutex and obtaining
access to this mutex by synchronized() for synchronized access and releasing
this mutex for unsynchronized access.
IMPORTANT: Do *not* use synchronized()/unsynchronized() within async signal
handlers. This may cause deadlocks. See PThread's pthread_mutex_lock man-page,
section "Async Signal Safety" for more information!
See also: Thread
const cardinal UDPHeaderSize
| UDPHeaderSize |
const cardinal IPv4HeaderSize
| IPv4HeaderSize |
const cardinal IPv6HeaderSize
| IPv6HeaderSize |
This class manages a socket. IPv6 support is automatically available,
when supported by the system.
This abstract class realizes threads based on Linux's pthreads. The user
of this class has to implement run().
Synchronization is implemented by inheriting Synchronizable.
IMPORTANT: Do *not* use Thread methods within async signal handlers.
This may cause deadlocks. See PThread's pthread_mutex_lock man-page,
section "Async Signal Safety" for more information!
See also: Synchronizable
inline void debug (const char* string)
| debug |
Debug output.
Parameters:
string | Debug string to be written to cerr.
|
inline card64 getMicroTime ()
| getMicroTime |
Get microseconds since January 01, 1970.
Returns: Microseconds since January 01, 1970.
Translate 16-bit value to network byte order.
Parameters:
Returns: Translated value.
Translate 32-bit value to network byte order.
Parameters:
Returns: Translated value.
Translate 64-bit value to network byte order.
Parameters:
Returns: Translated value.
inline card64 translateToBinary (const double x)
| translateToBinary |
Translate double to 64-bit binary.
Parameters:
Returns: Translated value.
inline double translateToDouble (const card64 x)
| translateToDouble |
Translate 64-bit binary to double.
Parameters:
Returns: Translated value.
Calculate packets per second.
Asumption: Every frame has it's own packets.
Parameters:
payloadBytesPerSecond | Byte rate of payload data.
|
framesPerSecond | Frame rate.
|
maxPacketSize | Maximum size of a packet.
|
headerLength | Length of header for each frame.
|
Returns: Total bytes per second.
Calculate frames per second.
Asumption: Every frame has it's own packets.
Parameters:
payloadBytesPerSecond | Byte rate of payload data.
|
framesPerSecond | Frame rate.
|
maxPacketSize | Maximum size of a packet.
|
headerLength | Length of header for each frame.
|
Returns: Total frames per second.
Scan protocol, host and path from an URL string. The protocol my be
missing, if the String "protocol" is initialized with a default.
Parameters:
location | String with URL.
|
protocol | Place to store the protocol name.
|
host | Place to store the host name.
|
path | Place to store the path.
|
Returns: true on success; false otherwise.
bool getUserName (char* str, const size_t size, const uid_t uid = getuid())
| getUserName |
Get user name for given user ID.
Parameters:
str | Buffer to store name to.
|
size | Size of buffer.
|
uid | User ID.
|
Returns: true for success; false otherwise.
template<class T> void quickSort (T* array,
const integer start,
const integer end)
| quickSort |
Sort array using QuickSort algorithm.
Parameters:
array | Array to be sorted.
|
start | Start offset in array.
|
end | End offset in array.
|
template<class T> cardinal removeDuplicates (T* array,
const cardinal length)
| removeDuplicates |
Remove duplicates from *sorted* array.
Parameters:
array | Array to be sorted.
|
length | Length of array.
|
void printTimeStamp (ostream& os = cout)
| printTimeStamp |
Print time stamp (date and time) to given output stream.
Parameters:
UnixAddress (class) | UnixAddress |
This class manages an unix socket address.
Generated by: dreibh@kappes on Fri Aug 17 14:08:47 2001, using kdoc 2.0a53. |