Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 78305af383a0
Choose a base ref
...
head repository: smoltcp-rs/smoltcp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a3d6c1a0de1c
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 16, 2020

  1. Copy the full SHA
    a3d6c1a View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 examples/server.rs
3 changes: 2 additions & 1 deletion examples/server.rs
Original file line number Diff line number Diff line change
@@ -135,6 +135,7 @@ fn main() {

if socket.may_recv() {
let data = socket.recv(|buffer| {
let recvd_len = buffer.len();
let mut data = buffer.to_owned();
if data.len() > 0 {
debug!("tcp:6970 recv data: {:?}",
@@ -143,7 +144,7 @@ fn main() {
data.reverse();
data.extend(b"\n");
}
(data.len(), data)
(recvd_len, data)
}).unwrap();
if socket.can_send() && data.len() > 0 {
debug!("tcp:6970 send data: {:?}",