mirror of
https://github.com/deavmi/birchwood
synced 2024-09-20 13:22:52 +02:00
Client
- `sendMessage(Message)` now uses the new `Message(this).encode(ChecksMode)`
This commit is contained in:
parent
67520c2574
commit
80a6baf0f9
@ -883,18 +883,22 @@ public class Client : Thread
|
|||||||
* Sends a message to the server by enqueuing it on
|
* Sends a message to the server by enqueuing it on
|
||||||
* the client-side send queue.
|
* the client-side send queue.
|
||||||
*
|
*
|
||||||
* A BirchwoodException is thrown if the messages
|
* Any invalid characters will be stripped prior
|
||||||
* final length exceeds 512 bytes
|
* to encoding IF `ChecksMode` is set to `EASY` (default)
|
||||||
*
|
*
|
||||||
* Params:
|
* Params:
|
||||||
* message = the message to send
|
* message = the message to send
|
||||||
|
* Throws:
|
||||||
|
* A `BirchwoodException` is thrown if the messages
|
||||||
|
* final length exceeds 512 bytes of if `ChecksMode`
|
||||||
|
* is set to `HARDCORE`
|
||||||
*/
|
*/
|
||||||
private void sendMessage(Message message)
|
private void sendMessage(Message message)
|
||||||
{
|
{
|
||||||
// TODO: Do message splits here
|
// TODO: Do message splits here
|
||||||
|
|
||||||
/* Encode the message */
|
/* Encode the message */
|
||||||
ubyte[] encodedMessage = encodeMessage(message.encode());
|
ubyte[] encodedMessage = encodeMessage(message.encode(connInfo.getMode()));
|
||||||
|
|
||||||
/* If the message is 512 bytes or less then send */
|
/* If the message is 512 bytes or less then send */
|
||||||
if(encodedMessage.length <= 512)
|
if(encodedMessage.length <= 512)
|
||||||
|
Loading…
Reference in New Issue
Block a user