aboutsummaryrefslogtreecommitdiff
path: root/assets/manual_img/screenshot_20161203_230644.png
diff options
context:
space:
mode:
authorMaverick2797 <git.maverick2797@gmail.com>2021-02-24 20:16:55 +0800
committerorwell96 <orwell@bleipb.de>2021-03-06 21:00:35 +0100
commite38f215faa95ad7fc2fb8c473f830aa689c468d2 (patch)
tree75808b3e1b823119930e9965e7e2118e243714fd /assets/manual_img/screenshot_20161203_230644.png
parent6135f8a23b4f507870dab481f4db466e6be0ac7d (diff)
downloadadvtrains-e38f215faa95ad7fc2fb8c473f830aa689c468d2.tar.gz
advtrains-e38f215faa95ad7fc2fb8c473f830aa689c468d2.tar.bz2
advtrains-e38f215faa95ad7fc2fb8c473f830aa689c468d2.zip
Added alternative recipes, falling back on the default: items as they seem to be in the rest of the mod.
May need rebalancing though.
Diffstat (limited to 'assets/manual_img/screenshot_20161203_230644.png')
0 files changed, 0 insertions, 0 deletions
> public: SocketException(const char *s): BaseException(s) { } }; class ResolveError : public BaseException { public: ResolveError(const char *s): BaseException(s) { } }; class SendFailedException : public BaseException { public: SendFailedException(const char *s): BaseException(s) { } }; void sockets_init(); void sockets_cleanup(); class Address { public: Address(); Address(unsigned int address, unsigned short port); Address(unsigned int a, unsigned int b, unsigned int c, unsigned int d, unsigned short port); bool operator==(Address &address); bool operator!=(Address &address); void Resolve(const char *name); unsigned int getAddress() const; unsigned short getPort() const; void setAddress(unsigned int address); void setAddress(unsigned int a, unsigned int b, unsigned int c, unsigned int d); void setPort(unsigned short port); void print(std::ostream *s) const; void print() const; std::string serializeString() const; private: unsigned int m_address; unsigned short m_port; }; class UDPSocket { public: UDPSocket(); ~UDPSocket(); void Bind(unsigned short port); //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; }; #endif