Public Member Functions

fawkes::StreamSocket Class Reference
[Fawkes Network Communication]

TCP stream socket over IP. More...

#include <netcomm/socket/stream.h>

Inheritance diagram for fawkes::StreamSocket:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 StreamSocket (float timeout=0.f)
 Constructor.
 StreamSocket (StreamSocket &s)
 Copy constructor.
virtual Socketclone ()
 Clone socket.
void set_nodelay (bool no_delay)
 Enable or disable Nagle algorithm.
bool nodelay ()
 Check if Nalge algorithm is disabled.

Detailed Description

TCP stream socket over IP.

Author:
Tim Niemueller

Definition at line 31 of file stream.h.


Constructor & Destructor Documentation

fawkes::StreamSocket::StreamSocket ( float  timeout = 0.f  ) 

Constructor.

Parameters:
timeout timeout, if 0 all operationsare blocking, otherwise it is tried for timeout seconds.

Definition at line 46 of file stream.cpp.

Referenced by clone().

fawkes::StreamSocket::StreamSocket ( StreamSocket stream_socket  ) 

Copy constructor.

Parameters:
stream_socket socket to copy.

Definition at line 55 of file stream.cpp.


Member Function Documentation

Socket * fawkes::StreamSocket::clone (  )  [virtual]

Clone socket.

Returns:
a copied instance of StreamSocket.

Implements fawkes::Socket.

Definition at line 65 of file stream.cpp.

References StreamSocket().

bool fawkes::StreamSocket::nodelay (  ) 

Check if Nalge algorithm is disabled.

This checks the TCP_NODELAY option on the socket. If it is set then the Nagle algorithm is disabled and all data is send out immediately.

Returns:
true, if nodelay is enabled and thus the Nagle algorithm disabled, false otherwise

Definition at line 78 of file stream.cpp.

References fawkes::Socket::sock_fd.

void fawkes::StreamSocket::set_nodelay ( bool  nodelay  ) 

Enable or disable Nagle algorithm.

Parameters:
nodelay true to disable Nagle algorithm, false to enable it
See also:
nodelay()

Definition at line 94 of file stream.cpp.

References fawkes::Socket::sock_fd.


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