src/network/core/udp.h
changeset 6115 c5bde03ec914
parent 6112 77a567235d2f
child 6116 3c464a271d89
equal deleted inserted replaced
6114:512f5a99132a 6115:c5bde03ec914
   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