pub struct SessionEndpoint { /* private fields */ }
Implementations§
Source§impl SessionEndpoint
impl SessionEndpoint
Sourcepub async fn session_request<I, E, S>(
&mut self,
sdp_descriptor: S,
) -> Result<String, SessionError>
pub async fn session_request<I, E, S>( &mut self, sdp_descriptor: S, ) -> Result<String, SessionError>
Receives an incoming SDP descriptor of an RTCSessionDescription
from a browser, informs
the corresponding Server
of the new WebRTC session, and returns a JSON object
containing two fields:
- An
answer
field which is an SDP descriptor that can be used to construct anRTCSessionDescription
. - a
candidate
field which is a configuration object for anRTCIceCandidate
.
The returned SDP descriptor contains a digest of the x509 certificate the server will use for DTLS, and the browser will ensure that this digest matches before starting a WebRTC connection.
Sourcepub async fn http_session_request<I, E, S>(
&mut self,
sdp_descriptor: S,
) -> Result<Response<String>, SessionError>
pub async fn http_session_request<I, E, S>( &mut self, sdp_descriptor: S, ) -> Result<Response<String>, SessionError>
Convenience method which returns an http::Response
rather than a JSON string, with the
correct format headers.
Trait Implementations§
Source§impl Clone for SessionEndpoint
impl Clone for SessionEndpoint
Source§fn clone(&self) -> SessionEndpoint
fn clone(&self) -> SessionEndpoint
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SessionEndpoint
impl !RefUnwindSafe for SessionEndpoint
impl Send for SessionEndpoint
impl Sync for SessionEndpoint
impl Unpin for SessionEndpoint
impl !UnwindSafe for SessionEndpoint
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