Changeset 9869 in orxonox.OLD for trunk/src/lib/network/udp_broadcast.cc
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/udp_broadcast.cc
r8623 r9869 26 26 this->port = 0; 27 27 packet = SDLNet_AllocPacket( BROADCAST_PACKET_SIZE ); 28 29 if ( !packet ) 28 29 if ( !packet ) 30 30 { 31 31 printf( "SDLNet_AllocPacket: %s\n", SDLNet_GetError() ); 32 32 assert( packet ); 33 33 } 34 34 35 35 this->socket = NULL; 36 36 } … … 47 47 this->packet = NULL; 48 48 } 49 49 50 50 if ( this->socket ) 51 51 { … … 53 53 this->socket = NULL; 54 54 } 55 55 56 56 } 57 57 58 58 /** 59 59 * listen for incoming broadcast packets 60 * @param port port to listen on 60 * @param port port to listen on 61 61 * @return true on success 62 62 */ … … 74 74 { 75 75 this->port = port; 76 76 77 77 return true; 78 78 } … … 80 80 /** 81 81 * send packet 82 * @param data data to send 82 * @param data data to send 83 83 * @param length length of data 84 84 * @param ip if ip == NULL broadcast is used
Note: See TracChangeset
for help on using the changeset viewer.