Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2006, 4:45:14 PM (19 years ago)
Author:
bensch
Message:

some network-stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/network/udp_broadcast.cc

    r8623 r9690  
    1818#include "udp_broadcast.h"
    1919
     20NewObjectListDefinition(UdpBroadcast);
    2021/**
    2122 * standard constructor
     
    2627  this->port = 0;
    2728  packet = SDLNet_AllocPacket( BROADCAST_PACKET_SIZE );
    28  
    29   if ( !packet ) 
     29
     30  if ( !packet )
    3031  {
    3132    printf( "SDLNet_AllocPacket: %s\n", SDLNet_GetError() );
    3233    assert( packet );
    3334  }
    34  
     35
    3536  this->socket = NULL;
    3637}
     
    4748    this->packet = NULL;
    4849  }
    49  
     50
    5051  if ( this->socket )
    5152  {
     
    5354    this->socket = NULL;
    5455  }
    55  
     56
    5657}
    5758
    5859/**
    5960 * listen for incoming broadcast packets
    60  * @param port port to listen on 
     61 * @param port port to listen on
    6162 * @return true on success
    6263 */
     
    7475{
    7576  this->port = port;
    76  
     77
    7778  return true;
    7879}
     
    8081/**
    8182 * send packet
    82  * @param data data to send 
     83 * @param data data to send
    8384 * @param length length of data
    8485 * @param ip if ip == NULL broadcast is used
Note: See TracChangeset for help on using the changeset viewer.