#include <sys/stat.h>
#include <sys/time.h>
#include <limits.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include "assa/Address.h"
#include "assa/Streambuf.h"
Go to the source code of this file.
Namespaces | |
namespace | ASSA |
Defines | |
#define | BYTES_LEFT_IN_SOCKBUF(s) ((s).eof () ? -1 : (s).in_avail ()) |
BYTES_LEFT_IN_SOCKBUF macro returns number of unprocessed bytes left in ASSA's double-buffer from EventHandler::handle_read() callback. | |
#define | BYTES_LEFT_IN_SIN (cin.eof () ? -1 : cin.rdbuf ()->in_avail ()) |
BYTES_LEFT_IN_SIN macro returns number of unprocessed bytes left in cin internal buffer. | |
Functions | |
Socket & | flush (Socket &os_) |
flush manipulator. | |
Socket & | endl (Socket &os_) |
endl manipulator. | |
Socket & | ends (Socket &os_) |
ends manipulator. |
Definition in file Socket.h.
|
BYTES_LEFT_IN_SIN macro returns number of unprocessed bytes left in cin internal buffer.
|
|
BYTES_LEFT_IN_SOCKBUF macro returns number of unprocessed bytes left in ASSA's double-buffer from EventHandler::handle_read() callback. Unless for a valid reason, this macro should always be called.
|
|
endl manipulator.
If you want to insert a newline character ('
Definition at line 602 of file Socket.h. Referenced by ASSA::GenServer::display_help(), ASSA::FileLogger::dump(), ASSA::FileLogger::handle_rollover(), ASSA::GenServer::init(), and ASSA::Logger::log_open(). 00603 { 00604 char c = '\n'; 00605 os_.write (&c, 1); 00606 os_.flush (); 00607 return (os_); 00608 }
|
|
ends manipulator. You can insert a null character (without flushing the output stream) with the manipulator ends. A common use for a Socket object is to mediate output to a stream buffer that constructs an in-memory character sequence. Such a sequence wants a terminating null character. The manipulator ends provides highly visible evidence that the null character is indeed being supplied.
Definition at line 622 of file Socket.h. Referenced by ASSA::Semaphore::dump(), ASSA::Option::dump(), ASSA::FdSet::dump_c_str(), ASSA::Socket::dumpState(), ASSA::GenServer::get_version(), ASSA::GenServer::handle_signal(), ASSA::Reactor::registerIOHandler(), and ASSA::PidFileLock::write_pid(). 00623 { 00624 char c = '\0'; 00625 os_.write (&c, 1); 00626 return (os_); 00627 }
|
|
flush manipulator. Flush a stream buffer. Definition at line 587 of file Socket.h. References ASSA::Socket::flush(). Referenced by ASSA::Logger_Impl::format_msg(), ASSA::RemoteLogger::log_close(), ASSA::FileLogger::log_close(), ASSA::RemoteLogger::log_func(), ASSA::FileLogger::log_func(), ASSA::RemoteLogger::log_msg(), ASSA::FileLogger::log_msg(), ASSA::RemoteLogger::log_open(), ASSA::FileLogger::log_raw_msg(), ASSA::StdOutLogger::log_resync(), ASSA::RemoteLogger::log_resync(), and ASSA::FileLogger::log_resync(). 00588 {
00589 os_.flush ();
00590 return (os_);
00591 }
|