Changeset 9690 in orxonox.OLD for branches/new_class_id/src/lib/network/udp_broadcast.cc
- Timestamp:
- Aug 22, 2006, 4:45:14 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/network/udp_broadcast.cc
r8623 r9690 18 18 #include "udp_broadcast.h" 19 19 20 NewObjectListDefinition(UdpBroadcast); 20 21 /** 21 22 * standard constructor … … 26 27 this->port = 0; 27 28 packet = SDLNet_AllocPacket( BROADCAST_PACKET_SIZE ); 28 29 if ( !packet ) 29 30 if ( !packet ) 30 31 { 31 32 printf( "SDLNet_AllocPacket: %s\n", SDLNet_GetError() ); 32 33 assert( packet ); 33 34 } 34 35 35 36 this->socket = NULL; 36 37 } … … 47 48 this->packet = NULL; 48 49 } 49 50 50 51 if ( this->socket ) 51 52 { … … 53 54 this->socket = NULL; 54 55 } 55 56 56 57 } 57 58 58 59 /** 59 60 * listen for incoming broadcast packets 60 * @param port port to listen on 61 * @param port port to listen on 61 62 * @return true on success 62 63 */ … … 74 75 { 75 76 this->port = port; 76 77 77 78 return true; 78 79 } … … 80 81 /** 81 82 * send packet 82 * @param data data to send 83 * @param data data to send 83 84 * @param length length of data 84 85 * @param ip if ip == NULL broadcast is used
Note: See TracChangeset
for help on using the changeset viewer.