Skip to content

Commit

Permalink
Use URC's for UDP
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepmistry committed Jan 23, 2019
1 parent 93bc3ea commit ea36ee1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/NBUdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,10 @@ int NBUDP::parsePacket()
return 0;
}

/*
if (!_packetReceived) {
return 0;
}
_packetReceived = false;
*/

String response;

Expand Down Expand Up @@ -321,5 +319,14 @@ void NBUDP::handleUrc(const String& urc)
if (socket == _socket) {
_packetReceived = true;
}
} else if (urc.startsWith("+UUSOCL: ")) {
int socket = urc.charAt(urc.length() - 1) - '0';

if (socket == _socket) {
// this socket closed
_socket = -1;
_rxIndex = 0;
_rxSize = 0;
}
}
}

0 comments on commit ea36ee1

Please sign in to comment.