Class Zend_TimeSync_Ntp

Description
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /TimeSync/Ntp.php (line 34)

Zend_TimeSync_Protocol
   |
   --Zend_TimeSync_Ntp
Variable Summary
 int $_port
Method Summary
 Zend_TimeSync_Ntp __construct (string $timeserver, int $port)
 integer _extract (array $binary)
 string _prepare ()
 array _read ()
 void _write (array $data)
Variables
int $_port = 123 (line 42)

This is the NTP port number (123) assigned by the Internet Assigned Numbers Authority to NTP.

  • access: protected

Inherited Variables

Inherited from Zend_TimeSync_Protocol

Zend_TimeSync_Protocol::$_exceptions
Zend_TimeSync_Protocol::$_info
Zend_TimeSync_Protocol::$_socket
Zend_TimeSync_Protocol::$_timeserver
Methods
Constructor __construct (line 50)

Class constructor, sets the timeserver and port number

  • access: public
Zend_TimeSync_Ntp __construct (string $timeserver, int $port)
  • string $timeserver
  • int $port
_extract (line 202)

Extracts the binary data returned from the timeserver

  • access: protected
integer _extract (array $binary)
  • array $binary

Redefinition of:
Zend_TimeSync_Protocol::_extract()
Abstract method that extracts the binary data returned from the timeserver
_prepare (line 67)

Prepare local timestamp for transmission in our request packet

NTP timestamps are represented as a 64-bit fixed-point number, in seconds relative to 0000 UT on 1 January 1900. The integer part is in the first 32 bits and the fraction part in the last 32 bits.

  • access: protected
string _prepare ()

Redefinition of:
Zend_TimeSync_Protocol::_prepare()
Abstract method that prepares the data to send to the timeserver
_read (line 148)

Reads the data returned from the timeserver

This will return an array with binary data listing:

  • access: protected
  • throws: Zend_TimeSync_Exception
array _read ()

Redefinition of:
Zend_TimeSync_Protocol::_read()
Abstract method that reads the data returned from the timeserver
_write (line 188)

Sends the NTP packet to the server

  • access: protected
void _write (array $data)
  • array $data

Redefinition of:
Zend_TimeSync_Protocol::_write()
Abstract method that writes data to to the timeserver

Inherited Methods

Inherited From Zend_TimeSync_Protocol

 Zend_TimeSync_Protocol::getDate()
 Zend_TimeSync_Protocol::getInfo()
 Zend_TimeSync_Protocol::_connect()
 Zend_TimeSync_Protocol::_disconnect()
 Zend_TimeSync_Protocol::_extract()
 Zend_TimeSync_Protocol::_prepare()
 Zend_TimeSync_Protocol::_read()
 Zend_TimeSync_Protocol::_write()

Documentation generated on Wed, 21 Feb 2007 12:02:44 -0800 by phpDocumentor 1.3.1