org.red5.server.net.rtmp
Class RTMPHandshake
java.lang.Object
org.red5.server.net.rtmp.RTMPHandshake
- All Implemented Interfaces:
- IHandshake
public class RTMPHandshake
- extends Object
- implements IHandshake
Generates the second 1536 byte chunk in the RTMP handshake response for
compatibility with Flash 9,0,124,0. Clients that require this send a nonzero
value as the fifth byte of the handshake request.
This class is based on the Ruby handshaking code from Takuma Mori.
- Author:
- Jacinto Shy II (jacinto.m.shy@ieee.org), Steven Zimmer (stevenlzimmer@gmail.com), Paul Gregoire (mondain@gmail.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Logger log
HANDSHAKE_PAD_BYTES
public static final byte[] HANDSHAKE_PAD_BYTES
random
protected Random random
RTMPHandshake
public RTMPHandshake()
generateResponse
public org.apache.mina.core.buffer.IoBuffer generateResponse(org.apache.mina.core.buffer.IoBuffer input)
- Specified by:
generateResponse
in interface IHandshake
calculateHMAC_SHA256
public byte[] calculateHMAC_SHA256(byte[] input,
byte[] key)
getHandshakeBytes
public static byte[] getHandshakeBytes()
getNewKeyPart
protected byte[] getNewKeyPart(org.apache.mina.core.buffer.IoBuffer input)
Copyright © 2006-2009 The Red5 Project