# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLNET::CDummyTcpSock Class Reference

Dummy CTcpSock replacement for replay mode. More...

#include <dummy_tcp_sock.h>

Inheritance diagram for NLNET::CDummyTcpSock:

NLNET::CTcpSock NLNET::CSock List of all members.

Public Methods

 CDummyTcpSock (bool logging=true)
virtual void connect (const CInetAddress &addr)
 Connection. More...

virtual void disconnect ()
 Active disconnection (shutdown) (mutexed). connected() becomes false. More...

virtual void setNoDelay (bool value)
 Sets/unsets TCP_NODELAY (by default, it is off, i.e. More...

virtual void close ()
 Closes the socket (without shutdown) In general you don't need to call this method. More...


Detailed Description

Dummy CTcpSock replacement for replay mode.

Author:
Olivier Cado , Nevrax France
Date:
2001

Definition at line 42 of file dummy_tcp_sock.h.


Constructor & Destructor Documentation

NLNET::CDummyTcpSock::CDummyTcpSock bool    logging = true [inline]
 

Definition at line 47 of file dummy_tcp_sock.h.

References NLNET::CTcpSock::CTcpSock.


Member Function Documentation

virtual void NLNET::CDummyTcpSock::close   [inline, virtual]
 

Closes the socket (without shutdown) In general you don't need to call this method.

But you can call it to:

  • close a listening socket (i.e. stop accepting connections), or
  • stop a select() in progress in another thread (in this case, just calling the destructor is not enough)

Reimplemented from NLNET::CSock.

Definition at line 59 of file dummy_tcp_sock.h.

void NLNET::CDummyTcpSock::connect const CInetAddress   addr [virtual]
 

Connection.

You can reconnect a socket after being disconnected. This method does not return a boolean, otherwise a programmer could ignore the result and no exception would be thrown if connection fails :

Reimplemented from NLNET::CTcpSock.

Definition at line 39 of file dummy_tcp_sock.cpp.

References NLNET::CSock::_BytesReceived, NLNET::CSock::_BytesSent, NLNET::CSock::_Connected, NLNET::CSock::_RemoteAddr, NLNET::CSock::_Sock, and nldebug.

void NLNET::CDummyTcpSock::disconnect   [virtual]
 

Active disconnection (shutdown) (mutexed). connected() becomes false.

Reimplemented from NLNET::CTcpSock.

Definition at line 58 of file dummy_tcp_sock.cpp.

References NLNET::CSock::_Connected, NLNET::CSock::_RemoteAddr, and nldebug.

virtual void NLNET::CDummyTcpSock::setNoDelay bool    value [inline, virtual]
 

Sets/unsets TCP_NODELAY (by default, it is off, i.e.

the Nagle buffering algorithm is enabled). You must call this method *after* connect().

Reimplemented from NLNET::CTcpSock.

Definition at line 56 of file dummy_tcp_sock.h.


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