Trait w5500_hl::Common[][src]

pub trait Common<E>: Registers<Error = E> {
    fn local_addr(&mut self, socket: Socket) -> Result<SocketAddrV4, E> { ... }
fn close(&mut self, socket: Socket) -> Result<(), E> { ... } }

Methods common to all W5500 socket types.

Provided methods

fn local_addr(&mut self, socket: Socket) -> Result<SocketAddrV4, E>[src]

Returns the socket address.

Example

use w5500_hl::ll::{Registers, Socket::Socket0};
use w5500_hl::{Common, Udp};

w5500.udp_bind(Socket0, 8080)?;
let local_addr = w5500.local_addr(Socket0)?;

fn close(&mut self, socket: Socket) -> Result<(), E>[src]

Close a socket.

This will not poll for completion, the socket may not be closed after this method has returned.

Example

use w5500_hl::ll::{Registers, Socket::Socket0};
use w5500_hl::Common;

w5500.close(Socket0)?;
Loading content...

Implementors

impl<T, E> Common<E> for T where
    T: Registers<Error = E>, 
[src]

Implement the common socket trait for any structure that implements w5500_ll::Registers.

Loading content...