Changeset 777 for code/branches/FICN/src/network/PacketBufferTestExt.cc
- Timestamp:
- Dec 31, 2007, 7:40:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/PacketBufferTestExt.cc
r514 r777 1 1 /* 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * 4 * 5 * License notice: 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * Author: 22 * ... 23 * Co-authors: 24 * ... 25 * 26 */ 27 27 28 28 #include <string> … … 30 30 #include <enet/enet.h> 31 31 #include <boost/thread/thread.hpp> 32 33 #include "util/Sleep.h" 32 34 #include "PacketBuffer.h" 33 35 #include "PacketBuffer.cc" 34 36 35 #ifdef WIN3236 #include <windows.h>37 #define usleep(x) Sleep((x)/1000)38 #else39 #include <unistd.h>40 #endif41 42 37 using namespace network; 43 44 38 45 39 void write(PacketBuffer *test){ … … 51 45 std::string temp = "packet "; 52 46 packet = enet_packet_create("packet", strlen("packet ")+1, 53 ENET_PACKET_FLAG_RELIABLE);47 ENET_PACKET_FLAG_RELIABLE); 54 48 std::cout << i << ": pushing " << packet->data << std::endl; 55 49 event.packet=packet;
Note: See TracChangeset
for help on using the changeset viewer.