- Timestamp:
- Dec 30, 2012, 7:19:04 PM (12 years ago)
- Branches:
- master
- Children:
- 38b85bb
- Parents:
- cee623e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Message.cpp
rcee623e r9c83610 11 11 #endif 12 12 13 #include <iostream> 14 15 using namespace std; 16 13 17 int sendMessage(NETWORK_MSG *msg, int sock, struct sockaddr_in *dest) 14 18 { 15 19 return 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; 16 22 } 17 23 … … 22 28 // assume we don't care about the value of socklen 23 29 return recvfrom(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, &socklen); 30 31 cout << "Received message of type " << msg->type << endl; 24 32 }
Note:
See TracChangeset
for help on using the changeset viewer.