variables
{
word handle;
}
void OnAREthClientAepConnected(dword aepHandle, ip_Endpoint localIPEndpoint, ip_Endpoint remoteIPEndpoint)
{
handle = aepHandle;
AREthTlsAuthenticateAsClient(aepHandle, "Server1");
}
void OnAREthEstablishedTLSConnection(ip_Endpoint localIPEndpoint, ip_Endpoint remoteIPEndpoint)
{
write("AREth (D)TLS established tls connection");
}
void OnAREthClosedTLSConnection(ip_Endpoint localIPEndpoint, ip_Endpoint remoteIPEndpoint, long closedByPeer)
{
write("AREth (D)TLS closed tls connection by peer %d", closedByPeer);
}
on key 'c'
{
long result;
result = AREthCloseLocalApplicationEndpoint(handle);
write("close established tcp connection result = %d", result);
}