Loading...
Searching...
No Matches
Socket.h File Reference

Abstraction of socket data type. More...

`#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.

## Classes

class | ASSA::Socket

## Namespaces

namespace | ASSA

## Macros

#define | BYTES_LEFT_IN_SOCKBUF(s)
| 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 & | ASSA::flush (Socket &os_)
| flush manipulator.
Socket & | ASSA::endl (Socket &os_)
| endl manipulator.
Socket & | ASSA::ends (Socket &os_)
| ends manipulator.

## Detailed Description

Abstraction of socket data type.

This will be a subclass of instream

Definition in file Socket.h.

## Macro Definition Documentation

## BYTES_LEFT_IN_SIN

#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.

Definition at line 59 of file Socket.h.

## BYTES_LEFT_IN_SOCKBUF

#define BYTES_LEFT_IN_SOCKBUF | ( |  | s | ) |

Value:
((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.

Unless for a valid reason, this macro should always be called.

Parameters

  s | Reference to ASSA::Socket

Definition at line 52 of file Socket.h.