Panda3D

datagramUDPHeader.I

00001 // Filename: datagramUDPHeader.I
00002 // Created by:  drose (01Aug01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: DatagramUDPHeader::get_datagram_checksum
00018 //       Access: Public
00019 //  Description: Returns the checksum appropriate for the indicated
00020 //               datagram.
00021 ////////////////////////////////////////////////////////////////////
00022 INLINE int DatagramUDPHeader::
00023 get_datagram_checksum() const {
00024   DatagramIterator di(_header);
00025   return di.get_uint16();
00026 }
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //     Function: DatagramUDPHeader::get_header
00030 //       Access: Public
00031 //  Description: Returns a pointer to a block of data of length
00032 //               datagram_udp_header_size, which can be written to the
00033 //               network as the header information.
00034 ////////////////////////////////////////////////////////////////////
00035 INLINE string DatagramUDPHeader::
00036 get_header() const {
00037   return _header.get_message();
00038 }
 All Classes Functions Variables Enumerations