Created
June 30, 2020 20:11
-
-
Save bobmcwhirter/fc835a71d02d80b6ff5663333a5a3067 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<'a,N:'static> ESP8266TcpSocket<'a, N> | |
where | |
N: ArrayLength<u8>, | |
{ | |
fn new(id: u8) -> Self | |
{ | |
let outbound = BBBuffer::new(); | |
let (out_p, out_c) = outbound.try_split().unwrap(); | |
let inbound = BBBuffer::new(); | |
let (in_p, in_c) = inbound.try_split().unwrap(); | |
ESP8266TcpSocket { | |
id: id, | |
outbound_producer: out_p, | |
outbound_consumer: out_c, | |
inbound_producer: in_p, | |
inbound_consumer: in_c, | |
is_connected: false, | |
is_open: false, | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment