libdap  Updated for version 3.17.0
libdap::MarshallerThread Class Reference

List of all members.

Classes

struct  write_args

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 bool get_print_time ()
static void set_print_time (bool state)
static void * write_thread (void *arg)
static void * write_thread_part (void *arg)

Detailed Description

Definition at line 83 of file MarshallerThread.h.


Member Function Documentation

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 189 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 201 of file MarshallerThread.cc.

void * MarshallerThread::write_thread ( void *  arg) [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()

Note:
The write_args argument may contain either a file descriptor (d_out_file) or an ostream& (d_out). If the file descriptor is not -1, then use that, else use the ostream reference.

Definition at line 219 of file MarshallerThread.cc.

void * MarshallerThread::write_thread_part ( void *  arg) [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()

Note:
This differers from MarshallerThread::write_thread() in that it writes data starting _after_ the four-byte length prefix that XDR adds to the data. It is used for the put_vector_part() calls in XDRStreamMarshaller.
Returns:
0 if successful, -1 otherwise.

Definition at line 272 of file MarshallerThread.cc.


The documentation for this class was generated from the following files: