Zusi 3 TCP Protocol Library
An implementation of the Zusi 3 TCP protocol in C++.
Public Member Functions | List of all members
zusi::DebugSocket Class Reference

Dummy socket for debug purposes. More...

#include <DebugSocket.h>

Inherits zusi::Socket.

Public Member Functions

virtual int ReadBytes (void *dest, int bytes)
 Try to read bytes into dest from socket. More...
 
virtual int WriteBytes (const void *src, int bytes)
 Try to write bytes from src to socket. More...
 

Detailed Description

Dummy socket for debug purposes.

ReadBytes() has no function. WriteBytes() prints the data to the console.

Member Function Documentation

int zusi::DebugSocket::ReadBytes ( void *  dest,
int  bytes 
)
virtual

Try to read bytes into dest from socket.

Method should block until all requested bytes are read, or the stream ends

Parameters
destData buffer to write to
bytesNumber of bytes to read
Returns
Number of bytes read

Implements zusi::Socket.

int zusi::DebugSocket::WriteBytes ( const void *  src,
int  bytes 
)
virtual

Try to write bytes from src to socket.

Parameters
srcData buffer to read from
bytesNumber of bytes to read
Returns
Number of bytes successfully written

Implements zusi::Socket.


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