Struct ublox_cellular::DataService [−][src]
pub struct DataService<'a, C, CLK, const N: usize, const L: usize> where
C: AtatClient,
CLK: 'static + Clock, { /* fields omitted */ }
Implementations
impl<'a, C, CLK, const N: usize, const L: usize> DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: 'static + Clock,
impl<'a, C, CLK, const N: usize, const L: usize> DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: 'static + Clock,
pub fn try_new(
apn_info: &APNInfo,
network: &'a mut Network<C, CLK>,
sockets: &'a mut SocketSet<CLK, N, L>
) -> Result<Self, Error> where
Generic<CLK::T>: TryInto<Milliseconds>,
Trait Implementations
impl<'a, C, CLK, const N: usize, const L: usize> Dns for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
impl<'a, C, CLK, const N: usize, const L: usize> Dns for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
impl<'a, C, CLK, const N: usize, const L: usize> SSL for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
impl<'a, C, CLK, const N: usize, const L: usize> SSL for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
fn import_certificate(
&mut self,
profile_id: SecurityProfileId,
name: &str,
certificate: &[u8]
) -> Result<(), Error>
fn import_root_ca(
&mut self,
profile_id: SecurityProfileId,
name: &str,
root_ca: &[u8]
) -> Result<(), Error>
fn import_private_key(
&mut self,
profile_id: SecurityProfileId,
name: &str,
private_key: &[u8],
password: Option<&str>
) -> Result<(), Error>
fn enable_ssl(
&mut self,
profile_id: SecurityProfileId,
server_hostname: &str
) -> Result<(), Error>
impl<'a, C, CLK, const N: usize, const L: usize> TcpClientStack for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
Generic<CLK::T>: TryInto<Milliseconds>,
impl<'a, C, CLK, const N: usize, const L: usize> TcpClientStack for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
Generic<CLK::T>: TryInto<Milliseconds>,
Open a new TCP socket to the given address and port. The socket starts in the unconnected state.
Connect to the given remote host and port.
Check if this socket is still connected
Write to the stream. Returns the number of bytes written is returned
(which may be less than buffer.len()
), or an error.
Read from the stream. Returns Ok(n)
, which means n
bytes of
data have been received and they have been placed in
&buffer[0..n]
, or an error.
Close an existing TCP socket.
type Error = Error
type Error = Error
The type returned when we have an error
type TcpSocket = SocketHandle
type TcpSocket = SocketHandle
The type returned when we create a new TCP socket
impl<'a, C, CLK, const N: usize, const L: usize> UdpClientStack for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
Generic<CLK::T>: TryInto<Milliseconds>,
impl<'a, C, CLK, const N: usize, const L: usize> UdpClientStack for DataService<'a, C, CLK, N, L> where
C: AtatClient,
CLK: Clock,
Generic<CLK::T>: TryInto<Milliseconds>,
Open a new UDP socket to the given address and port. UDP is connectionless,
so unlike TcpStack
no connect()
is required.
Send a datagram to the remote host.
Read a datagram the remote host has sent to us. Returns Ok(n)
, which
means a datagram of size n
has been received and it has been placed
in &buffer[0..n]
, or an error.
Close an existing UDP socket.
type Error = Error
type Error = Error
The type returned when we have an error
type UdpSocket = SocketHandle
type UdpSocket = SocketHandle
The type returned when we create a new UDP socket