Skip to content

Commit

Permalink
Minor change on delivery order of RTMP setting message protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuPOUX committed Nov 11, 2015
1 parent 1d58ce6 commit 391aad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MonaCore/sources/RTMP/RTMPSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ void RTMPSession::receive(BinaryReader& packet) {

// ack if required
if (_unackBytes >= _winAckSize) {
_readBytes += _unackBytes; // TODO : what's happen if > MAX_INT?
TRACE("Sending ACK : ", _readBytes, " bytes (_unackBytes: ", _unackBytes, ")")
_readBytes += _unackBytes;
NOTE("Sending ACK : ", _readBytes, " bytes (_unackBytes: ", _unackBytes, ")")
_pController->writeAck(_readBytes);
_unackBytes = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions MonaCore/sources/RTMP/RTMPWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ RTMPWriter::RTMPWriter(UInt32 id,TCPSession& session,std::shared_ptr<RTMPSender>
}

void RTMPWriter::writeProtocolSettings() {
// to eliminate chunks of packet in the server->client direction
write(AMF::CHUNKSIZE).packet.write32(0x7FFFFFFF);
// to increase the window ack size in the server->client direction
writeWinAckSize(2500000);
// to increase the window ack size in the client->server direction
write(AMF::BANDWITH).packet.write32(2500000).write8(0); // hard setting
// Stream Begin - ID 0
write(AMF::RAW).packet.write16(0).write32(0);
// to eliminate chunks of packet in the server->client direction
write(AMF::CHUNKSIZE).packet.write32(0x7FFFFFFF);
}

bool RTMPWriter::flush() {
Expand Down

0 comments on commit 391aad6

Please sign in to comment.