mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:20:06 +00:00 
			
		
		
		
	Initial NTP protocol functionality
This commit is contained in:
		
							parent
							
								
									5a8ebfa7ae
								
							
						
					
					
						commit
						94d81c0c6b
					
				
					 7 changed files with 318 additions and 5 deletions
				
			
		
							
								
								
									
										32
									
								
								wxdata/include/scwx/network/ntp_client.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								wxdata/include/scwx/network/ntp_client.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,32 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <memory> | ||||
| #include <string_view> | ||||
| 
 | ||||
| namespace scwx::network | ||||
| { | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief NTP Client | ||||
|  */ | ||||
| class NtpClient | ||||
| { | ||||
| public: | ||||
|    explicit NtpClient(); | ||||
|    ~NtpClient(); | ||||
| 
 | ||||
|    NtpClient(const NtpClient&)            = delete; | ||||
|    NtpClient& operator=(const NtpClient&) = delete; | ||||
| 
 | ||||
|    NtpClient(NtpClient&&) noexcept; | ||||
|    NtpClient& operator=(NtpClient&&) noexcept; | ||||
| 
 | ||||
|    void Open(std::string_view host, std::string_view service); | ||||
|    void Poll(); | ||||
| 
 | ||||
| private: | ||||
|    class Impl; | ||||
|    std::unique_ptr<Impl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace scwx::network
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat