diff options
author | Aaron Marks <nymacro@gmail.com> | 2005-07-16 10:00:53 +0000 |
---|---|---|
committer | Aaron Marks <nymacro@gmail.com> | 2005-07-16 10:00:53 +0000 |
commit | ce87adec648c69af2313e6077dad467d9ca8af3f (patch) | |
tree | f74727012cd5f1f646e4b75c7a8c47c80424af4c /src/client.cpp | |
parent | 34e887895276242efaf2e0b5f1700c1ab1d6b3db (diff) | |
download | manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.tar.gz manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.tar.bz2 manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.tar.xz manaserv-ce87adec648c69af2313e6077dad467d9ca8af3f.zip |
Added chat message handler placeholder (still not fully functional).
Updated PostgreSQL SQL support - although there is still problem with primary key being initialized to null.
Updated message enumeration.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 24 |
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); |