Package org.red5.server.net.rtmp
Class Channel
java.lang.Object
org.red5.server.net.rtmp.Channel
Identified connection that transfers packets.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private final RTMPConnection
RTMP connection used to transfer packets.private final int
Channel idprotected static org.slf4j.Logger
-
Constructor Summary
ConstructorDescriptionChannel
(RTMPConnection conn, int channelId) Creates channel from connection and channel id -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes channel with this id on RTMP connection.private void
discard
(IRTMPEvent event) Discard an event routed to this channel.protected RTMPConnection
Getter for RTMP connection.int
getId()
Getter for id.void
sendStatus
(Status status) Sends status notification.toString()
void
write
(IRTMPEvent event) Writes packet from event data to RTMP connection.private void
write
(IRTMPEvent event, Number streamId) Writes packet from event data to RTMP connection and stream id.
-
Field Details
-
log
protected static org.slf4j.Logger log -
CALL_ON_STATUS
- See Also:
-
connection
RTMP connection used to transfer packets. -
id
private final int idChannel id
-
-
Constructor Details
-
Channel
Creates channel from connection and channel id- Parameters:
conn
- ConnectionchannelId
- Channel id
-
-
Method Details
-
close
public void close()Closes channel with this id on RTMP connection. -
getId
public int getId()Getter for id.- Returns:
- Channel ID
-
getConnection
Getter for RTMP connection.- Returns:
- RTMP connection
-
write
Writes packet from event data to RTMP connection.- Parameters:
event
- Event data
-
write
Writes packet from event data to RTMP connection and stream id.- Parameters:
event
- Event datastreamId
- Stream id
-
discard
Discard an event routed to this channel.- Parameters:
event
-
-
sendStatus
Sends status notification.- Parameters:
status
- Status
-
toString
-