src/network/core/udp.h
changeset 5864 a95a2849b0e1
parent 5861 afa0676eedf5
child 5865 4d8c2e5ad9fb
equal deleted inserted replaced
5863:f328cb63dab3 5864:a95a2849b0e1
   118 	 * a NetworkGameInfo. Only grfid and md5sum are set, the rest is zero. This
   118 	 * a NetworkGameInfo. Only grfid and md5sum are set, the rest is zero. This
   119 	 * function must set all appropriate fields. This GRF is later appended to
   119 	 * function must set all appropriate fields. This GRF is later appended to
   120 	 * the grfconfig list of the NetworkGameInfo.
   120 	 * the grfconfig list of the NetworkGameInfo.
   121 	 * @param config the GRF to handle
   121 	 * @param config the GRF to handle
   122 	 */
   122 	 */
   123 	virtual void HandleIncomingNetworkGameInfoGRFConfig(GRFConfig *config) { NOT_REACHED(); }
   123 	virtual void HandleIncomingNetworkGameInfoGRFConfig(GRFConfig *config) = 0;
   124 public:
   124 public:
       
   125 	/** On destructing of this class, the socket needs to be closed */
   125 	virtual ~NetworkUDPSocketHandler() { this->Close(); }
   126 	virtual ~NetworkUDPSocketHandler() { this->Close(); }
   126 
   127 
   127 	bool Listen(uint32 host, uint16 port, bool broadcast);
   128 	bool Listen(uint32 host, uint16 port, bool broadcast);
   128 	void Close();
   129 	void Close();
   129 
   130