[Opalvoip-svn] SF.net SVN: opalvoip:[32335] ptlib/branches/v2_14
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2014-07-09 05:10:51
|
Revision: 32335 http://sourceforge.net/p/opalvoip/code/32335 Author: rjongbloed Date: 2014-07-09 05:10:47 +0000 (Wed, 09 Jul 2014) Log Message: ----------- Added ability to write a PEthSocket::Frame() object to a PChannel. Modified Paths: -------------- ptlib/branches/v2_14/include/ptlib/ethsock.h ptlib/branches/v2_14/src/ptlib/common/pethsock.cxx Modified: ptlib/branches/v2_14/include/ptlib/ethsock.h =================================================================== --- ptlib/branches/v2_14/include/ptlib/ethsock.h 2014-07-09 03:09:24 UTC (rev 32334) +++ ptlib/branches/v2_14/include/ptlib/ethsock.h 2014-07-09 05:10:47 UTC (rev 32335) @@ -228,6 +228,10 @@ PINDEX maxSize = 65536 ); + virtual bool Write( + PChannel & channel + ) const; + virtual bool Read( PChannel & channel, PINDEX packetSize = P_MAX_INDEX @@ -290,6 +294,8 @@ const PTime & GetTimestamp() const { return m_timestamp; } bool IsFragmentated() const { return m_fragmentated; } + PINDEX GetSize() const { return m_rawSize; } + protected: PTime m_timestamp; PBYTEArray m_rawData; Modified: ptlib/branches/v2_14/src/ptlib/common/pethsock.cxx =================================================================== --- ptlib/branches/v2_14/src/ptlib/common/pethsock.cxx 2014-07-09 03:09:24 UTC (rev 32334) +++ ptlib/branches/v2_14/src/ptlib/common/pethsock.cxx 2014-07-09 05:10:47 UTC (rev 32335) @@ -334,6 +334,12 @@ } +bool PEthSocket::Frame::Write(PChannel & channel) const +{ + return channel.Write(m_rawData, m_rawSize); +} + + bool PEthSocket::Frame::Read(PChannel & channel, PINDEX packetSize) { PreRead(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |