How to limit message length to 300 characters server-side in SmartFoxServer?
Posted: 10 Jun 2024, 14:41
Hello everyone,
I'm working on a project with SmartFoxServer and I need to limit the length of messages that users can send to a maximum of 300 characters. I understand that the MaxMessageSize parameter refers to the message size in bytes rather than the number of characters.
- What is the correct way to check the message length server-side?
- Is there a better or more efficient way to implement this check?
Thank you in advance for any suggestions!
Best regards,
I'm working on a project with SmartFoxServer and I need to limit the length of messages that users can send to a maximum of 300 characters. I understand that the MaxMessageSize parameter refers to the message size in bytes rather than the number of characters.
- What is the correct way to check the message length server-side?
- Is there a better or more efficient way to implement this check?
Thank you in advance for any suggestions!
Best regards,