Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 14, 2007, 2:58:23 PM (16 years ago)
Author:
scheusso
Message:

changed packetbuffer and conenctionmanager to remember the client id/adjustet dummyserver/client

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/dummyclient.cc

    r200 r204  
    66#include <iostream>
    77#include <enet/enet.h>
     8#include "network/PacketManager.h"
    89
    910using namespace std;
     
    1415  ENetEvent event;
    1516  ENetPeer *peer;
     17  network::PacketGenerator pck;
    1618
    1719  enet_initialize();
     
    4446  for(int i=0; i<10; i++){
    4547        // weihnachtsmann bringt packete
    46     ENetPacket *packet = enet_packet_create ("packet1234", strlen("packet1234") + 1, ENET_PACKET_FLAG_RELIABLE);
     48    //ENetPacket *packet = enet_packet_create ("packet1234", strlen("packet1234") + 1, ENET_PACKET_FLAG_RELIABLE);
    4749        // extend the packet and append the string foo to it
    4850        // send packet to peer on channel id 0
    49     enet_peer_send(peer, 1, packet);
     51    enet_peer_send(peer, 1, pck.chatMessage("test"));
    5052        // keep the timeout very small for low delay
    5153    if(enet_host_service(client, &event, 1)==0){
Note: See TracChangeset for help on using the changeset viewer.