mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-04 00:59:32 +02:00
server Settings
git-svn-id: svn://elaine/murooma/trunk@255 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
f7cf7a2537
commit
979f6460d3
11 changed files with 122 additions and 48 deletions
43
common/serverSettings.h
Normal file
43
common/serverSettings.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef SERVER_SETTINGS_H
|
||||
#define SERVER_SETTINGS_H
|
||||
|
||||
#include "message.h"
|
||||
|
||||
|
||||
|
||||
class ServerSettings : public BaseMessage
|
||||
{
|
||||
public:
|
||||
ServerSettings(size_t _port = 0) : BaseMessage(message_type::serversettings), port(_port)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~ServerSettings()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void read(std::istream& stream)
|
||||
{
|
||||
stream.read(reinterpret_cast<char *>(&port), sizeof(int32_t));
|
||||
}
|
||||
|
||||
virtual uint32_t getSize()
|
||||
{
|
||||
return sizeof(int32_t);
|
||||
}
|
||||
|
||||
int32_t port;
|
||||
|
||||
protected:
|
||||
virtual void doserialize(std::ostream& stream)
|
||||
{
|
||||
stream.write(reinterpret_cast<char *>(&port), sizeof(int32_t));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue