Changeset bbebe9c in network-game for client/Client/main.cpp


Ignore:
Timestamp:
Sep 26, 2013, 1:00:44 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
b8f789d
Parents:
929b4e0
Message:

Clients send game join and creation messages to server and new message type has been added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    r929b4e0 rbbebe9c  
    11201120{
    11211121   string msg = txtChat->getStr();
    1122 
    11231122   txtChat->clear();
    11241123
    11251124   msgTo.type = MSG_TYPE_CHAT;
    1126 
    11271125   strcpy(msgTo.buffer, msg.c_str());
    11281126
     
    11381136{
    11391137   cout << "Joining game" << endl;
     1138
     1139   string msg = txtJoinGame->getStr();
     1140   txtJoinGame->clear();
     1141
     1142   msgTo.type = MSG_TYPE_JOIN_GAME;
     1143   strcpy(msgTo.buffer, msg.c_str());
     1144
     1145   msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
    11401146}
    11411147
     
    11431149{
    11441150   cout << "Creating game" << endl;
    1145 }
     1151
     1152   string msg = txtCreateGame->getStr();
     1153   txtCreateGame->clear();
     1154
     1155   msgTo.type = MSG_TYPE_CREATE_GAME;
     1156   strcpy(msgTo.buffer, msg.c_str());
     1157
     1158   msgProcessor.sendMessage(&msgTo, sock, &server, &outputLog);
     1159}
Note: See TracChangeset for help on using the changeset viewer.