-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
61 receive responses from a tcp server 2 #74
base: main
Are you sure you want to change the base?
Conversation
96834b0
to
cc4c417
Compare
@@ -392,7 +393,7 @@ pub(crate) trait ProtocolInterface { | |||
fn get_conn_status(&mut self) -> Result<ConnectionStatus, Error>; | |||
fn set_dns_config(&mut self, dns1: IpAddress, dns2: Option<IpAddress>) -> Result<(), Error>; | |||
fn req_host_by_name(&mut self, hostname: &str) -> Result<u8, Error>; | |||
fn get_host_by_name(&mut self) -> Result<[u8; MAX_NINA_RESPONSE_LENGTH], Error>; | |||
fn get_host_by_name(&mut self) -> Result<NinaResponseBuffer, Error>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One idea of mine, perhaps we could have a couple of different NinaResponseBuffer types:
- A shorter one, 255 bytes in length and maybe called
SmallNinaResponseBuffer
- A larger one intended for things like HTTP response documents and maybe called
LargeNinaResponseBuffer
The type that we always specify in these method definitions would implement a NinaResponseBuffer
trait and then we could make the return type be a generic.
esp32-wroom-rp/src/spi.rs
Outdated
// return Err(ProtocolError::TooManyParameters.into()); | ||
// } | ||
|
||
let mut response_param_buffer: NinaResponseBuffer = [0; MAX_NINA_RESPONSE_LENGTH]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then per my comment above about a generic NinaResponseBuffer trait/type, this could instantiate a LargeNinaResponseBuffer
.
esp32-wroom-rp/src/spi.rs
Outdated
|
||
fn receive_data(&mut self, socket: Socket) -> Result<NinaResponseBuffer, Error> { | ||
self.avail_data_tcp(socket); | ||
let mut response_param_buffer: NinaResponseBuffer = [0; MAX_NINA_RESPONSE_LENGTH]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And per my comment above, this would instantiate a SmallNinaResponseBuffer
.
a8888fd
to
55a4fac
Compare
…ry string output of the result response buffer
…ring is correct for read_response16's buf read length
… is working but more debugging around response payloads of length 5744+ still need to be figured out why those don't yet work.
Description
describe the intent of your changes here and/or what problem this tries to solve
GitHub Issue: link your GitHub issue here
Changes
Testing Strategy
describe how you or someone else can test and verify the changes
Concerns
describe any concerns that might be worth mentioning or discussing