NetClock Class

Properties   Methods   Events   Configuration Settings   Errors  

The NetClock class provides the current (GMT) time from an Internet Time Server.

Syntax

class ipworks.NetClock

Remarks

The NetClock component implements a standard Time Protocol client as specified in RFC 868, as well as an SNTP Protocol.

The address of the Time Server is provided in the time_server property. You get the time by calling the get_time method.

The class also allows you to synchronize your system time with that of the time_server. This is done through the get_and_set_time method. Calling get_and_set_time will request the time from the server and then set the system clock to match it.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

idleThe current status of the class.
local_hostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
local_timeThe time returned by the TimeServer converted to local time.
protocolThe protocol used by the class.
server_timeThe time returned by the TimeServer .
timeoutA timeout for the class.
time_portThe UDP port where the remote Time server is listening.
time_serverThe time server from which to request the time.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

configSets or retrieves a configuration setting.
do_eventsProcesses events from the internal message queue.
get_and_set_timeSame as the GetTime method, but system clock is also set to the received time.
get_timeSends a time request to the TimeServer to get the current time.
interruptInterrupt the current method.
resetReset the class.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

on_errorInformation about errors during data delivery.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

CaptureIPPacketInfoUsed to capture the packet information.
DestinationAddressUsed to get the destination address from the packet information.
DontFragmentUsed to set the Don't Fragment flag of outgoing packets.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the class binds.
MaxPacketSizeThe maximum length of the packets that can be received.
QOSDSCPValueUsed to specify an arbitrary QOS/DSCP setting (optional).
QOSTrafficTypeUsed to specify QOS/DSCP settings (optional).
ShareLocalPortIf set to True, allows more than one instance of the class to be active on the same local port.
SourceIPAddressUsed to set the source IP address used when sending a packet.
SourceMacAddressUsed to set the source MAC address used when sending a packet.
UseConnectionDetermines whether to use a connected socket.
UseIPv6Whether or not to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Python Edition - Version 20.0 [Build 8307]