summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 19e0fa46..e3b010b2 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -41,27 +41,35 @@ int main(int argc, char *argv[])
// Send a login message
MessageOut msg;
+ // Register
+ /*
+ msg.writeByte(CMSG_REGISTER);
+ msg.writeString("test");
+ msg.writeString("password");
+ msg.writeString("test@email.addr");
+ */
+
// Login
///*
- msg.writeByte(MSG_ACCOUNT);
- msg.writeByte(MSG_ACCOUNT_LOGIN);
+ msg.writeByte(CMSG_LOGIN);
msg.writeString("test");
msg.writeString("password");
//*/
- // Register
+ // Chat
/*
- msg.writeByte(MSG_ACCOUNT);
- msg.writeByte(MSG_ACCOUNT_REGISTER);
- msg.writeString("test");
- msg.writeString("password");
- msg.writeString("test@email.addr");
+ msg.writeByte(CMSG_SAY);
+ msg.writeString("Hello World!");
+ msg.writeShort(0);
*/
+ // message hex
+ /*
for (unsigned int i = 0; i < msg.getPacket()->length; i++) {
printf("%x ", msg.getPacket()->data[i]);
}
printf("\n");
+ */
SDLNet_TCP_Send(tcpsock, msg.getPacket()->data, msg.getPacket()->length);