Changeset 38b85bb in network-game for common/Message.cpp


Ignore:
Timestamp:
Dec 30, 2012, 7:27:10 PM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
8f438a5
Parents:
9c83610
Message:

Fixed debug messages in Message.cpp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Message.cpp

    r9c83610 r38b85bb  
    1717int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest)
    1818{
    19    return sendto(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, sizeof(struct sockaddr_in));
     19   int ret = sendto(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, sizeof(struct sockaddr_in));
    2020
    2121   cout << "Sent message of type " << msg->type << endl;
     22
     23   return ret;
    2224}
    2325
     
    2729
    2830   // assume we don't care about the value of socklen
    29    return recvfrom(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, &socklen);
     31   int ret = recvfrom(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, &socklen);
    3032
    3133   cout << "Received message of type " << msg->type << endl;
     34
     35   return ret;
    3236}
Note: See TracChangeset for help on using the changeset viewer.