~lucadestudios/lucadestudios/trunk

« back to all changes in this revision

Viewing changes to engine/src/shared/network-abandoned/node.h

  • Committer: Sean Hodges
  • Date: 2009-04-27 11:13:39 UTC
  • mfrom: (62.1.18 trunk)
  • Revision ID: seanhodges@bluebottle.com-20090427111339-d0ay5y47wxu3qlj1
Merged with upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    typedef boost::function<void (node*, packet_ptr)> packet_received_callback;
50
50
    typedef boost::function<void (node*, packet_ptr)> packet_sent_callback;
51
51
 
 
52
    /**
 
53
        Queues a packet to be sent, in the case of a client "dest" should be 0
 
54
        for a server it should be the index of the client to send to.
 
55
    */
 
56
    virtual void queue_packet(int dest, shared_ptr<packet> packetToSend) = 0;
52
57
    virtual bool receive() = 0; ///!< Returns true if packets were received
53
 
    virtual void send() = 0;
 
58
    virtual void send() = 0; ///!< Sends the queued packets
54
59
 
55
60
    callback_id register_packet_received_callback(packet_type_id packet_type, packet_received_callback func);
56
61
    callback_id register_packet_sent_callback(packet_type_id packet_type, packet_sent_callback func);