Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 31, 2007, 7:40:23 PM (16 years ago)
Author:
rgrieder
Message:
  • added dll support to the network library
  • improved header file dependency in network
File:
1 edited

Legend:

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

    r514 r777  
    11/*
    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  */
     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*/
    2727
    2828#include <string>
     
    3030#include <enet/enet.h>
    3131#include <boost/thread/thread.hpp>
     32
     33#include "util/Sleep.h"
    3234#include "PacketBuffer.h"
    3335#include "PacketBuffer.cc"
    3436
    35 #ifdef WIN32
    36 #include <windows.h>
    37 #define usleep(x) Sleep((x)/1000)
    38 #else
    39 #include <unistd.h>
    40 #endif
    41 
    4237using namespace network;
    43 
    4438
    4539void write(PacketBuffer *test){
     
    5145    std::string temp = "packet ";
    5246    packet = enet_packet_create("packet", strlen("packet ")+1,
    53 ENET_PACKET_FLAG_RELIABLE);
     47      ENET_PACKET_FLAG_RELIABLE);
    5448    std::cout << i << ": pushing " << packet->data << std::endl;
    5549    event.packet=packet;
Note: See TracChangeset for help on using the changeset viewer.