Public Member Functions

cygnal::RTMPServer Class Reference

#include <rtmp_server.h>

Inheritance diagram for cygnal::RTMPServer:
Inheritance graph
[legend]
Collaboration diagram for cygnal::RTMPServer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RTMPServer ()
 ~RTMPServer ()
boost::shared_ptr
< cygnal::Element
processClientHandShake (int fd)
bool packetSend (cygnal::Buffer &buf)
bool packetRead (cygnal::Buffer &buf)
boost::shared_ptr< cygnal::BufferencodeResult (gnash::RTMPMsg::rtmp_status_e status)
boost::shared_ptr< cygnal::BufferencodeResult (gnash::RTMPMsg::rtmp_status_e status, const std::string &filename)
boost::shared_ptr< cygnal::BufferencodeResult (gnash::RTMPMsg::rtmp_status_e status, const std::string &filename, double &transid)
boost::shared_ptr< cygnal::BufferencodeResult (gnash::RTMPMsg::rtmp_status_e status, double &transid)
boost::shared_ptr< cygnal::BufferencodeResult (gnash::RTMPMsg::rtmp_status_e status, const std::string &filename, double &transid, double &clientid)
boost::shared_ptr< cygnal::BufferencodePing (rtmp_ping_e type, boost::uint32_t milliseconds)
boost::shared_ptr< cygnal::BufferencodePing (rtmp_ping_e type)
boost::shared_ptr< cygnal::BufferencodeAudio (boost::uint8_t *data, size_t size)
boost::shared_ptr< cygnal::BufferencodeVideo (boost::uint8_t *data, size_t size)
boost::shared_ptr< cygnal::BufferencodeBWDone (double id)
std::vector< boost::shared_ptr
< cygnal::Element > > 
parseEchoRequest (cygnal::Buffer &buf)
std::vector< boost::shared_ptr
< cygnal::Element > > 
parseEchoRequest (boost::uint8_t *buf, size_t size)
boost::shared_ptr< cygnal::BufferformatEchoResponse (double num, cygnal::Element &el)
boost::shared_ptr< cygnal::BufferformatEchoResponse (double num, cygnal::Buffer &data)
boost::shared_ptr< cygnal::BufferformatEchoResponse (double num, boost::uint8_t *data, size_t size)
void addReference (boost::uint16_t index, cygnal::Element &el)
cygnal::ElementgetReference (boost::uint16_t index)
bool sendFile (int fd, const std::string &filespec)
std::string createClientID ()
double createStreamID ()
void setStreamID (double id)
double getStreamID ()
size_t sendToClient (std::vector< int > &fds, boost::uint8_t *data, size_t size)
size_t sendToClient (std::vector< int > &fds, cygnal::Buffer &data)
void setNetConnection (gnash::RTMPMsg *msg)
void setNetConnection (boost::shared_ptr< gnash::RTMPMsg > msg)
boost::shared_ptr< gnash::RTMPMsggetNetConnection ()
void dump ()

Constructor & Destructor Documentation

cygnal::RTMPServer::RTMPServer (  ) 
cygnal::RTMPServer::~RTMPServer (  ) 

Member Function Documentation

void cygnal::RTMPServer::addReference ( boost::uint16_t  index,
cygnal::Element el 
) [inline]
std::string cygnal::RTMPServer::createClientID (  ) 

References gnash::key::i, and test::v.

Referenced by encodeResult().

double cygnal::RTMPServer::createStreamID (  ) 

Referenced by encodeResult().

void cygnal::RTMPServer::dump (  ) 

Reimplemented from gnash::RTMP.

Referenced by packetRead().

boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeAudio ( boost::uint8_t *  data,
size_t  size 
)
boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeBWDone ( double  id  ) 
boost::shared_ptr< Buffer > cygnal::RTMPServer::encodePing ( rtmp_ping_e  type,
boost::uint32_t  milliseconds 
)
boost::shared_ptr< Buffer > cygnal::RTMPServer::encodePing ( rtmp_ping_e  type  ) 

References encodePing().

boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeResult ( gnash::RTMPMsg::rtmp_status_e  status,
const std::string &  filename 
)

References encodeResult().

boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeResult ( gnash::RTMPMsg::rtmp_status_e  status,
const std::string &  filename,
double &  transid,
double &  clientid 
)
boost::shared_ptr< Buffer > cygnal::RTMPServer::encodeResult ( gnash::RTMPMsg::rtmp_status_e  status  ) 
boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeResult ( gnash::RTMPMsg::rtmp_status_e  status,
const std::string &  filename,
double &  transid 
)

References encodeResult().

boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeResult ( gnash::RTMPMsg::rtmp_status_e  status,
double &  transid 
)

References encodeResult().

boost::shared_ptr< cygnal::Buffer > cygnal::RTMPServer::encodeVideo ( boost::uint8_t *  data,
size_t  size 
)
boost::shared_ptr<cygnal::Buffer> cygnal::RTMPServer::formatEchoResponse ( double  num,
cygnal::Element el 
)

Reimplemented in cygnal::EchoTest.

boost::shared_ptr<cygnal::Buffer> cygnal::RTMPServer::formatEchoResponse ( double  num,
cygnal::Buffer data 
)

Reimplemented in cygnal::EchoTest.

boost::shared_ptr<cygnal::Buffer> cygnal::RTMPServer::formatEchoResponse ( double  num,
boost::uint8_t *  data,
size_t  size 
)

Reimplemented in cygnal::EchoTest.

boost::shared_ptr<gnash::RTMPMsg> cygnal::RTMPServer::getNetConnection (  )  [inline]

Reimplemented in cygnal::EchoTest, and cygnal::OflaDemoTest.

Referenced by connection_handler().

cygnal::Element& cygnal::RTMPServer::getReference ( boost::uint16_t  index  )  [inline]
double cygnal::RTMPServer::getStreamID (  )  [inline]
bool cygnal::RTMPServer::packetRead ( cygnal::Buffer buf  ) 
bool cygnal::RTMPServer::packetSend ( cygnal::Buffer buf  ) 
std::vector<boost::shared_ptr<cygnal::Element > > cygnal::RTMPServer::parseEchoRequest ( boost::uint8_t *  buf,
size_t  size 
)

Reimplemented in cygnal::EchoTest.

std::vector<boost::shared_ptr<cygnal::Element > > cygnal::RTMPServer::parseEchoRequest ( cygnal::Buffer buf  )  [inline]
boost::shared_ptr< cygnal::Element > cygnal::RTMPServer::processClientHandShake ( int  fd  ) 

This method is called after the initial network connection is established. It reads in the handshake from the client, responds appropriately, and then extracts the initial AMF object, which is always of type NetConnection, doing an INVOKE operation of connect(). serverFinish() is actually used to extract the AMF data from the packet, and handShakeResponse() is used to construct the response packet.

NetConnection object.

References _, CLOCK_REALTIME, gnash::RTMP::decodeHeader(), gnash::RTMP::decodeMsgBody(), encodeBWDone(), encodePing(), encodeResult(), gnash::RTMP::recvMsg(), gnash::RTMP_SYSTEM_CHANNEL, gnash::RTMP_VIDEO_PACKET_SIZE, gnash::Network::setTimeout(), and cygnal::swapBytes().

Referenced by connection_handler().

bool cygnal::RTMPServer::sendFile ( int  fd,
const std::string &  filespec 
)
size_t cygnal::RTMPServer::sendToClient ( std::vector< int > &  fds,
boost::uint8_t *  data,
size_t  size 
)

References gnash::Network::writeNet().

Referenced by sendToClient().

size_t cygnal::RTMPServer::sendToClient ( std::vector< int > &  fds,
cygnal::Buffer data 
)
void cygnal::RTMPServer::setNetConnection ( boost::shared_ptr< gnash::RTMPMsg msg  )  [inline]

Reimplemented in cygnal::EchoTest, and cygnal::OflaDemoTest.

void cygnal::RTMPServer::setNetConnection ( gnash::RTMPMsg msg  )  [inline]

Reimplemented in cygnal::EchoTest, and cygnal::OflaDemoTest.

Referenced by connection_handler().

void cygnal::RTMPServer::setStreamID ( double  id  )  [inline]

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