libdap
Updated for version 3.20.6
libdap4 is an implementation of OPeNDAP's DAP protocol.
|
#include <MarshallerThread.h>
Public Member Functions | |
int & | get_child_thread_count () |
pthread_cond_t & | get_cond () |
pthread_mutex_t & | get_mutex () |
void | increment_child_thread_count () |
void | start_thread (void *(*thread)(void *arg), std::ostream &out, char *byte_buf, unsigned int bytes_written) |
void | start_thread (void *(*thread)(void *arg), int fd, char *byte_buf, unsigned int bytes_written) |
Static Public Member Functions | |
static void * | write_thread (void *arg) |
static void * | write_thread_part (void *arg) |
Implement a multi-threaded data transmission sub-system for libdap. This class makes it fairly painless to send data using a child thread so that the main thread can be used to read the next chunk of data while whatever has been read to this point is sent over the wire.
This code is used by XDRStreamMarshaller and (soon) D4StreamMarshaller.
Definition at line 96 of file MarshallerThread.h.
void MarshallerThread::start_thread | ( | void *(*)(void *arg) | thread, |
std::ostream & | out, | ||
char * | byte_buf, | ||
unsigned int | bytes | ||
) |
Start the child thread, using the arguments given. This will write 'bytes' bytes from 'byte_buf' to the output stream 'out'
Definition at line 215 of file MarshallerThread.cc.
void MarshallerThread::start_thread | ( | void *(*)(void *arg) | thread, |
int | fd, | ||
char * | byte_buf, | ||
unsigned int | bytes | ||
) |
Write 'bytes' bytes from 'byte_buf' to the file descriptor 'fd'.
Definition at line 227 of file MarshallerThread.cc.
|
static |
This static method is used to write data to the ostream referenced by the ostream element of write_args. This is used by start_thread() and passed to pthread_create()
Definition at line 245 of file MarshallerThread.cc.
|
static |
This static method is used to write data to the ostream referenced by the ostream element of write_args. This is used by start_thread() and passed to pthread_create()
Definition at line 302 of file MarshallerThread.cc.