pub struct Connect(/* private fields */);
Expand description
The command to exchange an information about application using.
Following format is required.
Setting Data | AMF Type | Value |
---|---|---|
Command Object | Object | See Command Object. |
§Command Object
The Command Object is written detailed informations of both applications. Concretely, several of following pair is exchanged:
§Publisher side
Key | AMF Type | Description |
---|---|---|
app | String | Server application name. |
type | String | "nonprivate" |
flashVer | String | Either a flash player version(client) or an FLV encoder version(server). |
tcUrl | String | The URL to connect server as the TCP. app value is included in this value. |
§Subscriber side
Implementations§
Trait Implementations§
Source§impl ChunkData for Connect
impl ChunkData for Connect
const CHANNEL: Channel = Channel::System
const MESSAGE_TYPE: MessageType = MessageType::Command
Source§impl Decoder<Connect> for ByteBuffer
impl Decoder<Connect> for ByteBuffer
Source§fn decode(&mut self) -> IOResult<Connect>
fn decode(&mut self) -> IOResult<Connect>
Decodes bytes into a Connect command.
§Errors
When some field misses.
When some value is inconsistent with its marker.
§Examples
use sheave_core::{
ByteBuffer,
Decoder,
Encoder,
messages::{
Connect,
amf::v0::Object,
}
};
let mut buffer = ByteBuffer::default();
buffer.encode(&Object::default());
assert!(Decoder::<Connect>::decode(&mut buffer).is_ok());
let mut buffer = ByteBuffer::default();
assert!(Decoder::<Connect>::decode(&mut buffer).is_err())
Source§impl Encoder<Connect> for ByteBuffer
impl Encoder<Connect> for ByteBuffer
impl Command for Connect
impl StructuralPartialEq for Connect
Auto Trait Implementations§
impl Freeze for Connect
impl RefUnwindSafe for Connect
impl Send for Connect
impl Sync for Connect
impl Unpin for Connect
impl UnwindSafe for Connect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more