Panda3D
panda
src
net
datagramUDPHeader.I
1
// Filename: datagramUDPHeader.I
2
// Created by: drose (01Aug01)
3
//
4
////////////////////////////////////////////////////////////////////
5
//
6
// PANDA 3D SOFTWARE
7
// Copyright (c) Carnegie Mellon University. All rights reserved.
8
//
9
// All use of this software is subject to the terms of the revised BSD
10
// license. You should have received a copy of this license along
11
// with this source code in a file named "LICENSE."
12
//
13
////////////////////////////////////////////////////////////////////
14
15
16
////////////////////////////////////////////////////////////////////
17
// Function: DatagramUDPHeader::get_datagram_checksum
18
// Access: Public
19
// Description: Returns the checksum appropriate for the indicated
20
// datagram.
21
////////////////////////////////////////////////////////////////////
22
INLINE
int
DatagramUDPHeader::
23
get_datagram_checksum
()
const
{
24
DatagramIterator
di(_header);
25
return
di.
get_uint16
();
26
}
27
28
////////////////////////////////////////////////////////////////////
29
// Function: DatagramUDPHeader::get_header
30
// Access: Public
31
// Description: Returns a pointer to a block of data of length
32
// datagram_udp_header_size, which can be written to the
33
// network as the header information.
34
////////////////////////////////////////////////////////////////////
35
INLINE
string
DatagramUDPHeader::
36
get_header
()
const
{
37
return
_header.
get_message
();
38
}
DatagramUDPHeader::get_datagram_checksum
int get_datagram_checksum() const
Returns the checksum appropriate for the indicated datagram.
Definition:
datagramUDPHeader.I:23
DatagramIterator::get_uint16
PN_uint16 get_uint16()
Extracts an unsigned 16-bit integer.
Definition:
datagramIterator.I:197
DatagramUDPHeader::get_header
string get_header() const
Returns a pointer to a block of data of length datagram_udp_header_size, which can be written to the ...
Definition:
datagramUDPHeader.I:36
DatagramIterator
A class to retrieve the individual data elements previously stored in a Datagram. ...
Definition:
datagramIterator.h:30
Datagram::get_message
string get_message() const
Returns the datagram's data as a string.
Definition:
datagram.I:431
Generated on Wed May 17 2017 23:43:47 for Panda3D by
1.8.13