aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/smartroute.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2026-01-22 20:25:00 +0100
committerorwell <orwell@bleipb.de>2026-01-22 20:25:00 +0100
commit404690b08dca855ef57cde9fba0bd32caf4abef1 (patch)
tree3d0c29f2c12cfea0fe2e0293b9dd9ab565d82e4c /advtrains_interlocking/smartroute.lua
parentd6469df4c73432ca953be9645a7db3626026f117 (diff)
RailwayTime: Extend to hours precision, wrap clock at 7 days, clip repeating times at day boundary
Diffstat (limited to 'advtrains_interlocking/smartroute.lua')
0 files changed, 0 insertions, 0 deletions
class="hl ppc">#ifdef _WIN32 #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include <windows.h> #include <winsock2.h> #include <ws2tcpip.h> #else #include <sys/socket.h> #include <netinet/in.h> #endif #include <ostream> #include <cstring> #include "address.h" #include "irrlichttypes.h" #include "networkexceptions.h" extern bool socket_enable_debug_output; void sockets_init(); void sockets_cleanup(); class UDPSocket { public: UDPSocket() = default; UDPSocket(bool ipv6); ~UDPSocket(); void Bind(Address addr); bool init(bool ipv6, bool noExceptions = false); // void Close(); // bool IsOpen(); void Send(const Address &destination, const void *data, int size); // Returns -1 if there is no data int Receive(Address &sender, void *data, int size); int GetHandle(); // For debugging purposes only void setTimeoutMs(int timeout_ms); // Returns true if there is data, false if timeout occurred bool WaitData(int timeout_ms); private: int m_handle; int m_timeout_ms; int m_addr_family; };