Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2007, 2:45:07 PM (17 years ago)
Author:
dumenim
Message:

Client got a new function send Chat

Location:
code/branches/FICN/src/network
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/Client.cc

    r425 r438  
    9090    return client_connection.sendPackets();
    9191  }
     92 
     93  /**
     94   * submits a chat message to the server
     95   * @param message message to send
     96   * @return true/false
     97   */
     98  bool Client::sendKeyboard( std::string message ){
     99    // generate packet and add it to queue
     100    if(!isConnected)
     101      return false;
     102    if(!client_connection.addPacket(pck_gen.chatMessage( message.c_str() )));
     103        return false;
     104    // send packets
     105    return client_connection.sendPackets();
     106  }
    92107
    93108  /**
  • code/branches/FICN/src/network/Client.h

    r425 r438  
    4141  bool sendMouse(double x, double y);
    4242  bool sendKeyboard(char key_code);
     43  bool sendChat( std::string message );
    4344
    4445  bool addMouse(double x, double y);
Note: See TracChangeset for help on using the changeset viewer.