Search: 
Available in: IP*WORKS! | SSL
Ipdaemon Class
IPDaemon Component [IP*Works! V8]

Properties   Methods   Events   Configuration Settings  

The IPDaemon component is used to create TCP/IP servers. The component handles multiple simultaneous connections on the same TCP/IP port (service port). It is designed to balance the load between connections for a fast, powerful server.

NOTE: What follows is a very short description of the component interfaces. For more information, please consult the help files that come with the respective package.

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 1000 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 (a number between 1 and MaxConnections). 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 complete descriptions.

ConnectionBacklog The maximum number of pending connections maintained by the TCP/IP subsystem.
Connections A collection of currently connected clients.
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.

Method List


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

Config Sets or retrieves a component configuration setting.
Disconnect Disconnect from the remote host.
DoEvents Processes events from the internal message queue.
Send Send data to the remote host.
SendFile Send file to the remote host.
SendLine Sends a string followed by a newline.
Shutdown Shutdown 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 complete descriptions.

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 (complete lines) 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.

Configuration Settings


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

BindExclusively Whether or not the component considers a local port reserved for exclusive use.
CloseStreamAfterTransfer If true, the component will close the upload or download stream after the transfer.
CodePage The system code page used for Unicode to Multibyte translations (Windows/COM only).
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.
TcpNoDelay Whether or not to delay when sending packets

| About | Privacy Policy | Terms of Use |
© Copyright 2008 /n software inc.