Changes in common/Message.cpp [8f438a5:b53c6b3] in network-game


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Message.cpp

    r8f438a5 rb53c6b3  
    1111#endif
    1212
    13 #include <iostream>
    14 
    15 using namespace std;
    16 
    1713int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest)
    1814{
    19    int ret =  sendto(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, sizeof(struct sockaddr_in));
    20 
    21    cout << "Sent message of type " << msg->type << endl;
    22 
    23    return ret;
     15   return sendto(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, sizeof(struct sockaddr_in));
    2416}
    2517
     
    2921
    3022   // assume we don't care about the value of socklen
    31    int ret =  recvfrom(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, &socklen);
    32 
    33    if (ret > -1)
    34       cout << "Received message of type " << msg->type << endl;
    35 
    36    return ret;
     23   return recvfrom(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, &socklen);
    3724}
Note: See TracChangeset for help on using the changeset viewer.