diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-07-16 03:55:54 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-07-16 03:55:54 +0000 |
commit | 34e887895276242efaf2e0b5f1700c1ab1d6b3db (patch) | |
tree | 8e2805ad893678364cde6ec1a37146c1bbecf075 /src/client.cpp | |
parent | ca0ffbbacfcba5e0f019c83fd0b759752b192ca0 (diff) | |
download | manaserv-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.cpp | 23 |
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); |