IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

IPDaemon Component

Properties   Methods   Events   Configuration Settings   Errors  

The IPDaemon Component is a generic TCP server component based on an asynchronous, event-driven architecture. It is designed to balance the load between connections for a fast, powerful server.

Syntax

TipwIPDaemon

Remarks

IPDaemon is the server complement of IPPort (which is used to create client applications). They share a common design philosophy and interface. We expect you will find IPDaemon as easy to use as IPPort.

By default, each instance of IPDaemon can handle up to 1,000 simultaneous incoming connections (this number may be increased up to 100,000 or decreased to a lower value by using the MaxConnections configuration setting).

The connections are identified by a ConnectionId, an id generated by the component to identify each connection. This id is unique to each connection. IPDaemon's events also have ConnectionId as a parameter to identify the connection they relate to.

Our main goal in designing IPDaemon was to make it easy to use without sacrificing performance. The component has a minimum of properties, and six events: ConnectionRequest, Connected, DataIn, Disconnected, ReadyToSend, and Error.

IPDaemon can start to listen on a port by setting the Listening property to True. When a remote host asks for a connection, the ConnectionRequest event is fired. At that point, the connection can either be accepted or rejected. If the connection is accepted, a ConnectionId is assigned, and communication can start. From this point on, the operation is very similar to IPPort. Data is sent by assigning the data string to the DataToSend property. The address and port of the incoming connection can be found by querying the RemoteHost and RemotePort properties.

Property List


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

ConnectionBacklogThe maximum number of pending connections maintained by the TCP/IP subsystem.
ConnectionCountThe number of records in the arrays.
AcceptDataSetting this property to False, temporarily disables data reception (and the DataIn event) on the connection.
BytesSentThis property shows how many bytes were sent after the last assignment to DataToSend .
ConnectedThis property is used to disconnect individual connections and/or show their status.
ConnectionIdThis property contains an identifier generated by the component to identify each connection.
DataToSendThis property contains a string of data to be sent to the remote host.
EOLThe EOL property is used to define boundaries in the input stream using the value of the property.
LocalAddressThis property shows the IP address of the interface through which the connection is passing.
RemoteHostThis property shows the IP address of the remote host through which the connection is coming.
RemotePortThis property shows the TCP port on the remote host through which the connection is coming.
SingleLineModeThis property shows the special mode for line-oriented protocols.
TimeoutThis property contains a timeout for the component.
DefaultEOLA default EOL value to be used by incoming connections.
DefaultMaxLineLengthThe default maximum line length value for inbound connections.
DefaultSingleLineModeTells the component whether or not to treat new connections as line-oriented.
DefaultTimeoutAn initial timeout value to be used by incoming connections.
KeepAliveWhen True, KEEPALIVE packets are enabled (for long connections).
LingerWhen set to True, connections are terminated gracefully.
ListeningIf True, the component accepts incoming connections on LocalPort.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
LocalPortThe TCP port in the local host where the component listens.

Method List


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

ConfigSets or retrieves a configuration setting .
DisconnectDisconnect the specified client.
DoEventsProcesses events from the internal message queue.
InterruptInterrupts a synchronous send to the remote host.
SendSends data to the remote host.
SendFileSend file to the remote host.
SendLineSends a string followed by a newline.
ShutdownShuts down the server.

Event List


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

ConnectedFired immediately after a connection completes (or fails).
ConnectionRequestFired when a request for connection comes from a remote host.
DataInFired when data comes in.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
ReadyToSendFired when the component is ready to send data.

Configuration Settings


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

BindExclusivelyWhether or not the component considers a local port reserved for exclusive use.
InBufferSizeThe size in bytes of the incoming queue of the socket.
MaxConnectionsThe maximum number of connections available.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
RecordLength[ConnectionId]The length of received data records.
TcpNoDelayWhether or not to delay when sending packets.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0