Move MTProxy policy engine from tgnet/ to self-contained jni/mtproxy/ module. Consolidate reconnect hold computation into single MtProxyRetryAuthority owner (was split across Connection, ConnectionSocket, endpoint policy, and probe coordinator, causing hold misalignment bugs). Add MtProxyTerminalDiagnostic module with host tests for pre-I/O verdict preservation (fixes 02.07/30.06 clobber livelocks). Auto-generate phase classification (isPreIoTerminalVerdict, needsReconnectBackoff, isObservationFacadePhase, isLocalSchedulerTimeout) from single Python contract into both C++ and Java to eliminate parallel maintenance. Pass native hold (coordinator terminal hold + endpoint cooldown) via JNI to Java so reconnect timer and health store use THE clock, not re-derived ones. Optimize log flushing: batch debug lines, flush errors immediately. Add module boundary guard, host build system (MSVC), and unit tests for retry logic and terminal diagnostic derivation.
20 lines
431 B
C
20 lines
431 B
C
// Host-build stub for Tools/build_mtproxy_host.py (MSVC has no arpa/inet.h).
|
|
// Compile-only: the harness never links or runs this code.
|
|
#ifndef MTPROXY_HOST_STUB_ARPA_INET_H
|
|
#define MTPROXY_HOST_STUB_ARPA_INET_H
|
|
|
|
#ifndef AF_INET
|
|
#define AF_INET 2
|
|
#endif
|
|
#ifndef AF_INET6
|
|
#define AF_INET6 23
|
|
#endif
|
|
|
|
inline int inet_pton(int af, const char *src, void *dst) {
|
|
(void) af;
|
|
(void) src;
|
|
(void) dst;
|
|
return 0;
|
|
}
|
|
|
|
#endif
|