/*! * @file proto_class.h * @brief Definition of ... */ #ifndef _UDP_BROADCAST_H #define _UDP_BROADCAST_H #include "netdefs.h" #include #define BROADCAST_PACKET_SIZE 1024 //! A class for sending/recieving brotcast packets for lan class UdpBroadcast { public: UdpBroadcast(); virtual ~UdpBroadcast(); bool listen( int port ); bool open( int port ); int send( byte * data, int length, IPaddress * ip = NULL ); int recv( byte * data, int maxLength, IPaddress * ip = NULL ); private: int port; UDPpacket * packet; UDPsocket socket; }; #endif /* _UDP_BROADCAST_H */