Struct windows::Networking::Sockets::StreamSocket
pub struct StreamSocket(/* private fields */);
Implementations§
§impl StreamSocket
impl StreamSocket
pub fn new() -> Result<Self>
pub fn Close(&self) -> Result<()>
pub fn Control(&self) -> Result<StreamSocketControl>
pub fn Information(&self) -> Result<StreamSocketInformation>
pub fn InputStream(&self) -> Result<IInputStream>
pub fn OutputStream(&self) -> Result<IOutputStream>
pub fn ConnectWithEndpointPairAsync<P0>(
&self,
endpointpair: P0
) -> Result<IAsyncAction>where
P0: IntoParam<EndpointPair>,
pub fn ConnectAsync<P0>(
&self,
remotehostname: P0,
remoteservicename: &HSTRING
) -> Result<IAsyncAction>where
P0: IntoParam<HostName>,
pub fn ConnectWithEndpointPairAndProtectionLevelAsync<P0>(
&self,
endpointpair: P0,
protectionlevel: SocketProtectionLevel
) -> Result<IAsyncAction>where
P0: IntoParam<EndpointPair>,
pub fn ConnectWithProtectionLevelAsync<P0>(
&self,
remotehostname: P0,
remoteservicename: &HSTRING,
protectionlevel: SocketProtectionLevel
) -> Result<IAsyncAction>where
P0: IntoParam<HostName>,
pub fn UpgradeToSslAsync<P0>(
&self,
protectionlevel: SocketProtectionLevel,
validationhostname: P0
) -> Result<IAsyncAction>where
P0: IntoParam<HostName>,
pub fn ConnectWithProtectionLevelAndAdapterAsync<P0, P1>(
&self,
remotehostname: P0,
remoteservicename: &HSTRING,
protectionlevel: SocketProtectionLevel,
adapter: P1
) -> Result<IAsyncAction>where
P0: IntoParam<HostName>,
P1: IntoParam<NetworkAdapter>,
pub fn CancelIOAsync(&self) -> Result<IAsyncAction>
pub fn EnableTransferOwnership(&self, taskid: GUID) -> Result<()>
pub fn EnableTransferOwnershipWithConnectedStandbyAction( &self, taskid: GUID, connectedstandbyaction: SocketActivityConnectedStandbyAction ) -> Result<()>
pub fn TransferOwnership(&self, socketid: &HSTRING) -> Result<()>
pub fn TransferOwnershipWithContext<P0>(
&self,
socketid: &HSTRING,
data: P0
) -> Result<()>where
P0: IntoParam<SocketActivityContext>,
pub fn TransferOwnershipWithContextAndKeepAliveTime<P0>(
&self,
socketid: &HSTRING,
data: P0,
keepalivetime: TimeSpan
) -> Result<()>where
P0: IntoParam<SocketActivityContext>,
pub fn GetEndpointPairsAsync<P0>(
remotehostname: P0,
remoteservicename: &HSTRING
) -> Result<IAsyncOperation<IVectorView<EndpointPair>>>where
P0: IntoParam<HostName>,
pub fn GetEndpointPairsWithSortOptionsAsync<P0>(
remotehostname: P0,
remoteservicename: &HSTRING,
sortoptions: HostNameSortOptions
) -> Result<IAsyncOperation<IVectorView<EndpointPair>>>where
P0: IntoParam<HostName>,
Trait Implementations§
§impl Clone for StreamSocket
impl Clone for StreamSocket
§fn clone(&self) -> StreamSocket
fn clone(&self) -> StreamSocket
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 more§impl Debug for StreamSocket
impl Debug for StreamSocket
§impl From<&StreamSocket> for &IInspectable
impl From<&StreamSocket> for &IInspectable
§fn from(value: &StreamSocket) -> Self
fn from(value: &StreamSocket) -> Self
Converts to this type from the input type.
§impl From<&StreamSocket> for &IUnknown
impl From<&StreamSocket> for &IUnknown
§fn from(value: &StreamSocket) -> Self
fn from(value: &StreamSocket) -> Self
Converts to this type from the input type.
§impl From<StreamSocket> for IInspectable
impl From<StreamSocket> for IInspectable
§fn from(value: StreamSocket) -> Self
fn from(value: StreamSocket) -> Self
Converts to this type from the input type.
§impl From<StreamSocket> for IUnknown
impl From<StreamSocket> for IUnknown
§fn from(value: StreamSocket) -> Self
fn from(value: StreamSocket) -> Self
Converts to this type from the input type.
§impl Interface for StreamSocket
impl Interface for StreamSocket
§fn as_raw(&self) -> *mut c_void
fn as_raw(&self) -> *mut c_void
Returns the raw COM interface pointer. The resulting pointer continues to be owned by the
Interface
implementation.§fn into_raw(self) -> *mut c_void
fn into_raw(self) -> *mut c_void
Returns the raw COM interface pointer and releases ownership. It the caller’s responsibility to release the COM interface pointer.
§fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
Attempts to cast the current interface to another interface using
QueryInterface
. Read more§impl PartialEq for StreamSocket
impl PartialEq for StreamSocket
§fn eq(&self, other: &StreamSocket) -> bool
fn eq(&self, other: &StreamSocket) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StreamSocket
impl Send for StreamSocket
impl StructuralPartialEq for StreamSocket
impl Sync for StreamSocket
Auto Trait Implementations§
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