summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-07-16 03:55:54 +0000
committerAaron Marks <nymacro@gmail.com>2005-07-16 03:55:54 +0000
commit34e887895276242efaf2e0b5f1700c1ab1d6b3db (patch)
tree8e2805ad893678364cde6ec1a37146c1bbecf075 /src/client.cpp
parentca0ffbbacfcba5e0f019c83fd0b759752b192ca0 (diff)
downloadmanaserv-34e887895276242efaf2e0b5f1700c1ab1d6b3db.tar.gz
manaserv-34e887895276242efaf2e0b5f1700c1ab1d6b3db.tar.bz2
manaserv-34e887895276242efaf2e0b5f1700c1ab1d6b3db.tar.xz
manaserv-34e887895276242efaf2e0b5f1700c1ab1d6b3db.zip
Fixed problem with memory expanding in Packet.
Server now handles register requests.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index f07ded2b..19e0fa46 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -40,9 +40,28 @@ int main(int argc, char *argv[])
// Send a login message
MessageOut msg;
- msg.writeByte(MSG_LOGIN);
- msg.writeString("nym");
+
+ // Login
+ ///*
+ msg.writeByte(MSG_ACCOUNT);
+ msg.writeByte(MSG_ACCOUNT_LOGIN);
+ msg.writeString("test");
+ msg.writeString("password");
+ //*/
+
+ // Register
+ /*
+ msg.writeByte(MSG_ACCOUNT);
+ msg.writeByte(MSG_ACCOUNT_REGISTER);
+ msg.writeString("test");
msg.writeString("password");
+ msg.writeString("test@email.addr");
+ */
+
+ 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);