Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: sara-n200-hello-mqtt-sn
udp_interface.h@1:34946e5c54a2, 2018-08-21 (annotated)
- Committer:
- KeystoneElectronic
- Date:
- Tue Aug 21 16:38:20 2018 +0200
- Revision:
- 1:34946e5c54a2
Move udp_interface here
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| KeystoneElectronic |
1:34946e5c54a2 | 1 | /* |
| KeystoneElectronic |
1:34946e5c54a2 | 2 | * udp_interface.h |
| KeystoneElectronic |
1:34946e5c54a2 | 3 | * |
| KeystoneElectronic |
1:34946e5c54a2 | 4 | * Created on: Aug 15, 2018 |
| KeystoneElectronic |
1:34946e5c54a2 | 5 | * Author: janus |
| KeystoneElectronic |
1:34946e5c54a2 | 6 | */ |
| KeystoneElectronic |
1:34946e5c54a2 | 7 | |
| KeystoneElectronic |
1:34946e5c54a2 | 8 | #ifndef SRC_UDP_INTERFACE_H_ |
| KeystoneElectronic |
1:34946e5c54a2 | 9 | #define SRC_UDP_INTERFACE_H_ |
| KeystoneElectronic |
1:34946e5c54a2 | 10 | #include <stdint.h> |
| KeystoneElectronic |
1:34946e5c54a2 | 11 | |
| KeystoneElectronic |
1:34946e5c54a2 | 12 | class UDPinterface |
| KeystoneElectronic |
1:34946e5c54a2 | 13 | { |
| KeystoneElectronic |
1:34946e5c54a2 | 14 | public: |
| KeystoneElectronic |
1:34946e5c54a2 | 15 | UDPinterface(){}; |
| KeystoneElectronic |
1:34946e5c54a2 | 16 | virtual ~UDPinterface(){}; |
| KeystoneElectronic |
1:34946e5c54a2 | 17 | |
| KeystoneElectronic |
1:34946e5c54a2 | 18 | virtual int connect(char *hostname, int port) = 0; |
| KeystoneElectronic |
1:34946e5c54a2 | 19 | virtual bool disconnect(int id) = 0; |
| KeystoneElectronic |
1:34946e5c54a2 | 20 | |
| KeystoneElectronic |
1:34946e5c54a2 | 21 | virtual int read(int sock_id, char *host, int *port, uint8_t *buff, int len, int timeout) = 0; |
| KeystoneElectronic |
1:34946e5c54a2 | 22 | virtual int write(int sock_id, char *host, int port, uint8_t *buff, int len, int timeout) = 0; |
| KeystoneElectronic |
1:34946e5c54a2 | 23 | }; |
| KeystoneElectronic |
1:34946e5c54a2 | 24 | |
| KeystoneElectronic |
1:34946e5c54a2 | 25 | |
| KeystoneElectronic |
1:34946e5c54a2 | 26 | |
| KeystoneElectronic |
1:34946e5c54a2 | 27 | #endif /* SRC_UDP_INTERFACE_H_ */ |