src/proto2/NetworkUDP.hh
changeset 185 25becd2cb026
parent 184 561892e2a30e
child 186 0738f2949a2b
equal deleted inserted replaced
184:561892e2a30e 185:25becd2cb026
     1 #ifndef NETWORK_UDP_HH
       
     2 #define NETWORK_UDP_HH
       
     3 
       
     4 #include "NetworkSocket.hh"
       
     5 #include "NetworkAddress.hh"
       
     6 #include "NetworkPacket.hh"
       
     7 
       
     8 class NetworkUDP {
       
     9     private:
       
    10         NetworkSocket socket;
       
    11 
       
    12         CL_SlotContainer slots;
       
    13 
       
    14     public:
       
    15         NetworkUDP (void);
       
    16         NetworkUDP (const NetworkAddress &bind_addr);
       
    17 
       
    18     private:
       
    19         void on_recv (void);
       
    20 
       
    21         CL_Signal_v2<NetworkPacket &, const NetworkAddress&> _sig_packet;
       
    22 
       
    23     public:
       
    24         bool sendto (const NetworkPacket &packet, const NetworkAddress &dst);
       
    25         
       
    26         CL_Signal_v2<NetworkPacket &, const NetworkAddress&>& sig_packet (void) { return _sig_packet; }
       
    27 };
       
    28 
       
    29 #endif /* NETWORK_UDP_HH */