27 #ifndef __ETHERNETTCPCLIENT_H__ 28 #define __ETHERNETTCPCLIENT_H__ 39 #define TCP_CONNECTION_TIMEOUT_MIN 100 43 #define TCP_CONNECTION_TIMEOUT_MAX 15000 57 #ifndef HIDE_FROM_DOXYGEN 67 #endif // !HIDE_FROM_DOXYGEN 110 int16_t
Read(uint8_t *dataPtr, uint32_t length);
151 uint32_t
Send(
const uint8_t *buff, uint32_t size)
override;
162 uint32_t
Send(uint8_t charToSend) {
163 return EthernetTcp::Send(charToSend);
176 uint32_t
Send(
const char *nullTermStr) {
177 return EthernetTcp::Send(nullTermStr);
187 using EthernetTcp::LocalPort;
203 return m_connectionTimeout;
218 #ifndef HIDE_FROM_DOXYGEN 220 #endif // !HIDE_FROM_DOXYGEN 223 uint16_t m_connectionTimeout;
224 bool m_dnsInitialized;
230 #endif // !__ETHERNETTCPCLIENT_H__ void Flush()
Wait until all outgoing data to the server has been sent.
int16_t Read()
Attempt to read the next available character.
void FlushInput()
Flush the received data.
int16_t Peek()
Attempt to get the next available character.
bool Connect(IpAddress ip, uint16_t port)
Connects the client to a specified remote IP address and port.
uint16_t ConnectionTimeout()
Returns the connection timeout.
Definition: EthernetTcpClient.h:202
uint32_t Send(const char *nullTermStr)
Send a TCP packet.
Definition: EthernetTcpClient.h:176
An IP Address class.
Definition: IpAddress.h:41
bool Connected()
Determines if the client is actively connected to a server.
uint32_t Send(uint8_t charToSend)
Send a TCP packet.
Definition: EthernetTcpClient.h:162
Namespace to encompass the ClearCore board API.
Definition: AdcManager.h:36
ClearCore TCP client class.
Definition: EthernetTcpClient.h:54
uint32_t Send(const uint8_t *buff, uint32_t size) override
Send the buffer contents to the server.
IpAddress RemoteIp()
Returns the remote IP address of the server this client is connected to.
uint16_t RemotePort()
Returns the remote port of the server this client is connected to.
int16_t BytesAvailable()
Returns the number of bytes available to read.
void Close()
Close the client's connection to the server.