IPDaemonS Component
Properties Methods Events Configuration Settings Errors
The IPDaemonS 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
TipsIPDaemonS
Remarks
The IPDaemonS Component is the SSL-enabled equivalent of the IP*Works! IPDaemon Component. The main difference is the introduction of a set of new properties and events that deal with SSL security. The SSLEnabledProtocols and SSLCipherStrength configuration settings determine which protocols are enabled and at what security level. The SSLCert properties are used to select a certificate for the server (please note that a valid certificate MUST be selected before the server can function). The SSLAuthenticateClients property together with SSLClientAuthentication event allow you to use digital certificates for client authentication. Finally, the SSLStatus event provides information about the SSL handshake.
IPDaemonS is the server complement of IPPortS (which is used to create client applications). They share a common design philosophy and interface. We expect you will find IPDaemonS as easy to use as IPPortS.
By default, each instance of IPDaemonS 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 IPDaemonS 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.
IPDaemonS 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.
ConnectionBacklog | The maximum number of pending connections maintained by the TCP/IP subsystem. |
ConnectionCount | The number of records in the arrays. |
AcceptData | Setting this property to False, temporarily disables data reception (and the DataIn event) on the connection. |
BytesSent | This property shows how many bytes were sent after the last assignment to DataToSend . |
Connected | This property is used to disconnect individual connections and/or show their status. |
ConnectionId | This property contains an identifier generated by the component to identify each connection. |
DataToSend | This property contains a string of data to be sent to the remote host. |
EOL | The EOL property is used to define boundaries in the input stream using the value of the property. |
LocalAddress | This property shows the IP address of the interface through which the connection is passing. |
RemoteHost | This property shows the IP address of the remote host through which the connection is coming. |
RemotePort | This property shows the TCP port on the remote host through which the connection is coming. |
SingleLineMode | This property shows the special mode for line-oriented protocols. |
Timeout | This property contains a timeout for the component. |
DefaultEOL | A default EOL value to be used by incoming connections. |
DefaultMaxLineLength | The default maximum line length value for inbound connections. |
DefaultSingleLineMode | Tells the component whether or not to treat new connections as line-oriented. |
DefaultTimeout | An initial timeout value to be used by incoming connections. |
KeepAlive | When True, KEEPALIVE packets are enabled (for long connections). |
Linger | When set to True, connections are terminated gracefully. |
Listening | If True, the component accepts incoming connections on LocalPort. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component listens. |
SSLAuthenticateClients | If true, the server asks the client(s) for a certificate. |
SSLCertEncoded | The certificate (PEM/base64 encoded). |
SSLCertStore | The name of the certificate store for the client certificate. |
SSLCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SSLCertStoreType | The type of certificate store for this certificate. |
SSLCertSubject | The subject of the certificate used for client authentication. |
SSLStartMode | Determines how the component starts the SSL negotiation. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
Disconnect | Disconnect the specified client. |
DoEvents | Processes events from the internal message queue. |
Interrupt | Interrupts a synchronous send to the remote host. |
Send | Sends data to the remote host. |
SendFile | Send file to the remote host. |
SendLine | Sends a string followed by a newline. |
Shutdown | Shuts down the server. |
StartSSL | Starts SSL negotiation on a connection. |
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.
Connected | Fired immediately after a connection completes (or fails). |
ConnectionRequest | Fired when a request for connection comes from a remote host. |
DataIn | Fired when data comes in. |
Disconnected | Fired when a connection is closed. |
Error | Information about errors during data delivery. |
ReadyToSend | Fired when the component is ready to send data. |
SSLClientAuthentication | Fired when the client presents its credentials to the server. |
SSLStatus | Shows the progress of the secure connection. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
BindExclusively | Whether or not the component considers a local port reserved for exclusive use. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
MaxConnections | The maximum number of connections available. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The 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. |
TcpNoDelay | Whether or not to delay when sending packets. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
CodePage | The system code page used for Unicode to Multibyte translations. |