#include <TcpConnection.h>
◆ TcpConnection() [1/2]
TcpConnection::TcpConnection |
( |
bool |
autoDestruct | ) |
|
|
inline |
◆ TcpConnection() [2/2]
TcpConnection::TcpConnection |
( |
tcp_pcb * |
connection, |
|
|
bool |
autoDestruct |
|
) |
| |
|
inline |
◆ ~TcpConnection()
virtual TcpConnection::~TcpConnection |
( |
| ) |
|
|
virtual |
◆ close()
virtual void TcpConnection::close |
( |
| ) |
|
|
virtual |
◆ connect() [1/2]
virtual bool TcpConnection::connect |
( |
const String & |
server, |
|
|
int |
port, |
|
|
bool |
useSsl = false |
|
) |
| |
|
virtual |
◆ connect() [2/2]
◆ flush()
void TcpConnection::flush |
( |
| ) |
|
◆ getAvailableWriteSize()
uint16_t TcpConnection::getAvailableWriteSize |
( |
| ) |
|
|
inline |
◆ getRemoteIp()
IpAddress TcpConnection::getRemoteIp |
( |
| ) |
const |
|
inline |
◆ getRemotePort()
uint16_t TcpConnection::getRemotePort |
( |
| ) |
const |
|
inline |
◆ getSsl()
Get a pointer to the current SSL session object.
Note that this is typically used so we can query properties of an established session. If you need to change session parameters this must be done via setSslInitHandler
.
◆ initialize()
void TcpConnection::initialize |
( |
tcp_pcb * |
pcb | ) |
|
|
protected |
◆ internalConnect()
◆ internalOnConnected()
err_t TcpConnection::internalOnConnected |
( |
err_t |
err | ) |
|
|
protected |
◆ internalOnDnsResponse()
void TcpConnection::internalOnDnsResponse |
( |
const char * |
name, |
|
|
LWIP_IP_ADDR_T * |
ipaddr, |
|
|
int |
port |
|
) |
| |
|
protected |
◆ internalOnError()
void TcpConnection::internalOnError |
( |
err_t |
err | ) |
|
|
protected |
◆ internalOnPoll()
err_t TcpConnection::internalOnPoll |
( |
| ) |
|
|
protected |
◆ internalOnReceive()
err_t TcpConnection::internalOnReceive |
( |
pbuf * |
p, |
|
|
err_t |
err |
|
) |
| |
|
protected |
◆ internalOnSent()
err_t TcpConnection::internalOnSent |
( |
uint16_t |
len | ) |
|
|
protected |
◆ onConnected()
virtual err_t TcpConnection::onConnected |
( |
err_t |
err | ) |
|
|
protectedvirtual |
◆ onError()
virtual void TcpConnection::onError |
( |
err_t |
err | ) |
|
|
protectedvirtual |
◆ onPoll()
virtual err_t TcpConnection::onPoll |
( |
| ) |
|
|
protectedvirtual |
◆ onReadyToSendData()
◆ onReceive()
virtual err_t TcpConnection::onReceive |
( |
pbuf * |
buf | ) |
|
|
protectedvirtual |
◆ onSent()
virtual err_t TcpConnection::onSent |
( |
uint16_t |
len | ) |
|
|
protectedvirtual |
◆ setDestroyedDelegate()
Sets a callback to be called when the object instance is destroyed.
- Parameters
-
◆ setSslConnection()
◆ setSslInitHandler()
Set the SSL session initialisation callback.
- Parameters
-
◆ setTimeOut()
void TcpConnection::setTimeOut |
( |
uint16_t |
waitTimeOut | ) |
|
◆ sslCreateSession()
bool TcpConnection::sslCreateSession |
( |
| ) |
|
|
protected |
◆ sslInitSession()
virtual void TcpConnection::sslInitSession |
( |
Ssl::Session & |
session | ) |
|
|
inlineprotectedvirtual |
Override in inherited classes to perform custom session initialisation.
Called when TCP connection is established before initiating handshake.
Reimplemented in HttpClientConnection.
◆ trySend()
◆ write() [1/2]
virtual int TcpConnection::write |
( |
const char * |
data, |
|
|
int |
len, |
|
|
uint8_t |
apiflags = TCP_WRITE_FLAG_COPY |
|
) |
| |
|
virtual |
Base write operation.
- Parameters
-
data | |
len | |
apiflags | TCP_WRITE_FLAG_COPY, TCP_WRITE_FLAG_MORE |
- Return values
-
Reimplemented in FtpDataStream.
◆ write() [2/2]
◆ writeString() [1/2]
int TcpConnection::writeString |
( |
const char * |
data, |
|
|
uint8_t |
apiflags = TCP_WRITE_FLAG_COPY |
|
) |
| |
|
inline |
◆ writeString() [2/2]
int TcpConnection::writeString |
( |
const String & |
data, |
|
|
uint8_t |
apiflags = TCP_WRITE_FLAG_COPY |
|
) |
| |
|
inline |
◆ autoSelfDestruct
bool TcpConnection::autoSelfDestruct = true |
|
protected |
◆ canSend
bool TcpConnection::canSend = true |
|
protected |
◆ sleep
◆ ssl
◆ sslInit
◆ tcp
tcp_pcb* TcpConnection::tcp = nullptr |
|
protected |
◆ timeOut
uint16_t TcpConnection::timeOut = USHRT_MAX |
|
protected |
By default a TCP connection does not have a time out.
◆ useSsl
bool TcpConnection::useSsl = false |
|
protected |
The documentation for this class was generated from the following file: