Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VsnetTCPSocket::Blob Struct Reference

Public Member Functions

 Blob ()
 
 Blob (size_t len)
 
 ~Blob ()
 
size_t missing () const
 
char * base ()
 

Public Attributes

char * buf
 
size_t present_len
 
size_t expected_len
 

Detailed Description

Definition at line 23 of file vsnet_sockettcp.cpp.

Constructor & Destructor Documentation

VsnetTCPSocket::Blob::Blob ( )
inline

Definition at line 29 of file vsnet_sockettcp.cpp.

29  : buf( 0 )
30  , present_len( 0 )
31  , expected_len( 0 ) {}
VsnetTCPSocket::Blob::Blob ( size_t  len)
inline

Definition at line 33 of file vsnet_sockettcp.cpp.

References buf.

33  : present_len( 0 )
34  , expected_len( len )
35  {
36  buf = new char[len];
37  }
VsnetTCPSocket::Blob::~Blob ( )
inline

Definition at line 39 of file vsnet_sockettcp.cpp.

References buf.

40  {
41  delete[] buf;
42  }

Member Function Documentation

char* VsnetTCPSocket::Blob::base ( )
inline

Definition at line 49 of file vsnet_sockettcp.cpp.

References buf, and present_len.

Referenced by VsnetTCPSocket::lower_selected().

50  {
51  return &buf[present_len];
52  }
size_t VsnetTCPSocket::Blob::missing ( ) const
inline

Definition at line 44 of file vsnet_sockettcp.cpp.

References expected_len, and present_len.

Referenced by VsnetTCPSocket::lower_selected().

45  {
47  }

Member Data Documentation

char* VsnetTCPSocket::Blob::buf
size_t VsnetTCPSocket::Blob::expected_len
size_t VsnetTCPSocket::Blob::present_len

The documentation for this struct was generated from the following file: