#include <TcpServer.h>
|
| TcpServer () |
|
| TcpServer (TcpClientConnectDelegate onClientHandler, TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler) |
|
| TcpServer (TcpClientDataDelegate clientReceiveDataHandler, TcpClientCompleteDelegate clientCompleteHandler) |
|
| TcpServer (TcpClientDataDelegate clientReceiveDataHandler) |
|
| ~TcpServer () |
|
virtual bool | listen (int port, bool useSsl=false) |
|
void | setKeepAlive (uint16_t seconds) |
|
void | shutdown () |
|
const Vector< TcpConnection * > & | getConnections () const |
|
virtual bool | connect (const String &server, int port, bool useSsl=false) |
|
virtual bool | connect (IpAddress addr, uint16_t port, bool useSsl=false) |
|
virtual void | close () |
|
int | writeString (const char *data, uint8_t apiflags=TCP_WRITE_FLAG_COPY) |
|
int | writeString (const String &data, uint8_t apiflags=TCP_WRITE_FLAG_COPY) |
|
virtual int | write (const char *data, int len, uint8_t apiflags=TCP_WRITE_FLAG_COPY) |
| Base write operation. More...
|
|
int | write (IDataSourceStream *stream) |
|
uint16_t | getAvailableWriteSize () |
|
void | flush () |
|
void | setTimeOut (uint16_t waitTimeOut) |
|
IpAddress | getRemoteIp () const |
|
uint16_t | getRemotePort () const |
|
void | setDestroyedDelegate (TcpConnectionDestroyedDelegate destroyedDelegate) |
| Sets a callback to be called when the object instance is destroyed. More...
|
|
void | setSslInitHandler (Ssl::Session::InitDelegate handler) |
| Set the SSL session initialisation callback. More...
|
|
bool | setSslConnection (Ssl::Connection *connection) |
|
Ssl::Session * | getSsl () |
| Get a pointer to the current SSL session object. More...
|
|
◆ TcpServer() [1/4]
◆ TcpServer() [2/4]
◆ TcpServer() [3/4]
◆ TcpServer() [4/4]
◆ ~TcpServer()
TcpServer::~TcpServer |
( |
| ) |
|
|
inline |
◆ close()
virtual void TcpConnection::close |
( |
| ) |
|
|
virtualinherited |
◆ connect() [1/2]
virtual bool TcpConnection::connect |
( |
const String & |
server, |
|
|
int |
port, |
|
|
bool |
useSsl = false |
|
) |
| |
|
virtualinherited |
◆ connect() [2/2]
◆ createClient()
virtual TcpConnection* TcpServer::createClient |
( |
tcp_pcb * |
clientTcp | ) |
|
|
protectedvirtual |
◆ flush()
void TcpConnection::flush |
( |
| ) |
|
|
inherited |
◆ getAvailableWriteSize()
uint16_t TcpConnection::getAvailableWriteSize |
( |
| ) |
|
|
inlineinherited |
◆ getConnections()
◆ getRemoteIp()
IpAddress TcpConnection::getRemoteIp |
( |
| ) |
const |
|
inlineinherited |
◆ getRemotePort()
uint16_t TcpConnection::getRemotePort |
( |
| ) |
const |
|
inlineinherited |
◆ 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 | ) |
|
|
protectedinherited |
◆ internalConnect()
◆ internalOnConnected()
err_t TcpConnection::internalOnConnected |
( |
err_t |
err | ) |
|
|
protectedinherited |
◆ internalOnDnsResponse()
void TcpConnection::internalOnDnsResponse |
( |
const char * |
name, |
|
|
LWIP_IP_ADDR_T * |
ipaddr, |
|
|
int |
port |
|
) |
| |
|
protectedinherited |
◆ internalOnError()
void TcpConnection::internalOnError |
( |
err_t |
err | ) |
|
|
protectedinherited |
◆ internalOnPoll()
err_t TcpConnection::internalOnPoll |
( |
| ) |
|
|
protectedinherited |
◆ internalOnReceive()
err_t TcpConnection::internalOnReceive |
( |
pbuf * |
p, |
|
|
err_t |
err |
|
) |
| |
|
protectedinherited |
◆ internalOnSent()
err_t TcpConnection::internalOnSent |
( |
uint16_t |
len | ) |
|
|
protectedinherited |
◆ listen()
virtual bool TcpServer::listen |
( |
int |
port, |
|
|
bool |
useSsl = false |
|
) |
| |
|
virtual |
◆ onAccept()
virtual err_t TcpServer::onAccept |
( |
tcp_pcb * |
clientTcp, |
|
|
err_t |
err |
|
) |
| |
|
protectedvirtual |
◆ onClient()
virtual void TcpServer::onClient |
( |
TcpClient * |
client | ) |
|
|
protectedvirtual |
◆ onClientComplete()
virtual void TcpServer::onClientComplete |
( |
TcpClient & |
client, |
|
|
bool |
successful |
|
) |
| |
|
protectedvirtual |
◆ onClientDestroy()
virtual void TcpServer::onClientDestroy |
( |
TcpConnection & |
connection | ) |
|
|
protectedvirtual |
◆ onClientReceive()
virtual bool TcpServer::onClientReceive |
( |
TcpClient & |
client, |
|
|
char * |
data, |
|
|
int |
size |
|
) |
| |
|
protectedvirtual |
◆ onConnected()
virtual err_t TcpConnection::onConnected |
( |
err_t |
err | ) |
|
|
protectedvirtualinherited |
◆ onError()
virtual void TcpConnection::onError |
( |
err_t |
err | ) |
|
|
protectedvirtualinherited |
◆ onPoll()
virtual err_t TcpConnection::onPoll |
( |
| ) |
|
|
protectedvirtualinherited |
◆ onReadyToSendData()
|
protectedvirtualinherited |
◆ onReceive()
virtual err_t TcpConnection::onReceive |
( |
pbuf * |
buf | ) |
|
|
protectedvirtualinherited |
◆ onSent()
virtual err_t TcpConnection::onSent |
( |
uint16_t |
len | ) |
|
|
protectedvirtualinherited |
◆ setDestroyedDelegate()
Sets a callback to be called when the object instance is destroyed.
- Parameters
-
◆ setKeepAlive()
void TcpServer::setKeepAlive |
( |
uint16_t |
seconds | ) |
|
◆ setSslConnection()
◆ setSslInitHandler()
Set the SSL session initialisation callback.
- Parameters
-
◆ setTimeOut()
void TcpConnection::setTimeOut |
( |
uint16_t |
waitTimeOut | ) |
|
|
inherited |
◆ shutdown()
void TcpServer::shutdown |
( |
| ) |
|
◆ sslCreateSession()
bool TcpConnection::sslCreateSession |
( |
| ) |
|
|
protectedinherited |
◆ sslInitSession()
virtual void TcpConnection::sslInitSession |
( |
Ssl::Session & |
session | ) |
|
|
inlineprotectedvirtualinherited |
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 |
|
) |
| |
|
virtualinherited |
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 |
|
) |
| |
|
inlineinherited |
◆ writeString() [2/2]
int TcpConnection::writeString |
( |
const String & |
data, |
|
|
uint8_t |
apiflags = TCP_WRITE_FLAG_COPY |
|
) |
| |
|
inlineinherited |
◆ active
bool TcpServer::active = true |
|
protected |
◆ activeClients
◆ autoSelfDestruct
bool TcpConnection::autoSelfDestruct = true |
|
protectedinherited |
◆ canSend
bool TcpConnection::canSend = true |
|
protectedinherited |
◆ connections
◆ maxConnections
By default, don't limit connection count.
◆ minHeapSize
size_t TcpServer::minHeapSize = 16384 |
|
protected |
◆ sleep
◆ ssl
◆ sslInit
◆ tcp
tcp_pcb* TcpConnection::tcp = nullptr |
|
protectedinherited |
◆ timeOut
uint16_t TcpConnection::timeOut = USHRT_MAX |
|
protectedinherited |
By default a TCP connection does not have a time out.
◆ useSsl
bool TcpConnection::useSsl = false |
|
protectedinherited |
The documentation for this class was generated from the following file: