Skip to content

Commit

Permalink
Move constants to message.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacquwes committed Mar 22, 2023
1 parent c55456c commit 83108b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Server/HelloMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "Message.h"

constexpr uint64_t CurrentVersion = 0x2;

namespace SocketMessages
{
struct HelloMessage : Message
Expand Down
3 changes: 0 additions & 3 deletions Server/IdentifyMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

#include "Message.h"

constexpr uint64_t UsernameMinLength = 0x03;
constexpr uint64_t UsernameMaxLength = 0x20;

namespace SocketMessages
{
struct IdentifyMessage : Message
Expand Down
6 changes: 6 additions & 0 deletions Server/Message.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

#include "Snowflake.h"

constexpr uint64_t ChatMessageMinLength = 0x01;
constexpr uint64_t ChatMessageMaxLength = 2000;
constexpr uint64_t CurrentVersion = 0x2;
constexpr uint64_t UsernameMinLength = 0x03;
constexpr uint64_t UsernameMaxLength = 0x20;

namespace SocketMessages
{
enum class MessageType : uint8_t
Expand Down
3 changes: 0 additions & 3 deletions Server/ReceiveChatMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

#include "Message.h"

constexpr uint64_t ChatMessageMinLength = 0x01;
constexpr uint64_t ChatMessageMaxLength = 2000;

namespace SocketMessages
{
struct ReceiveChatMessage : Message
Expand Down

0 comments on commit 83108b9

Please sign in to comment.