diff options
| author | Tero Kontkanen <tero.k@granitedevices.com> | 2017-08-23 14:44:10 +0300 |
|---|---|---|
| committer | Tero Kontkanen <tero.k@granitedevices.com> | 2017-08-23 14:44:10 +0300 |
| commit | 98a89371108bbcdedb201caf7be8b82a323e60cc (patch) | |
| tree | 915a5596c632256ab77d5dc42236644307ea3b66 /drivers/tcpip/tcpclient.h | |
| parent | 5d21340928cd46b3cb97cae0b9c707a71ef9ced0 (diff) | |
| parent | 4176d9358a526ff207bb5f4d127f4143a632d748 (diff) | |
| download | SimpleMotionV2-98a89371108bbcdedb201caf7be8b82a323e60cc.tar.gz SimpleMotionV2-98a89371108bbcdedb201caf7be8b82a323e60cc.zip | |
Merge branch 'feature/port_driver_ftdi_d2xx' into develop
Diffstat (limited to 'drivers/tcpip/tcpclient.h')
| -rw-r--r-- | drivers/tcpip/tcpclient.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/tcpip/tcpclient.h b/drivers/tcpip/tcpclient.h new file mode 100644 index 0000000..5ed075a --- /dev/null +++ b/drivers/tcpip/tcpclient.h @@ -0,0 +1,28 @@ +#ifndef tcpclient_INCLUDED +#define tcpclient_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + +//return port handle or -1 if fails +int OpenTCPPort(const char * ip_addr, int port); +int PollTCPPort(int, unsigned char *, int); +int SendTCPByte(int, unsigned char); +int SendTCPBuf(int, unsigned char *, int); +void CloseTCPport(int); + + +//accepted TCP/IP address format is nnn.nnn.nnn.nnn:pppp where n is IP address numbers and p is port number +int validateIpAddress(const char *s, const char **pip_end, + const char **pport_start); +int parseIpAddress(const char *s, char *ip, size_t ipsize, short *port); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif + + |
