IPDaemon Component

The IPDaemon control can be used to create TCP/IP servers running on PC's connected to a TCP/IP network. The control can handle up to 1000 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: The following is a very short description. For more information, please consult the help files that come with the respective package.)


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.

Each instance of IPDaemon can handle up to 1000 simultaneous incoming connections. These connections are identified by a ConnectionId (a number between 1 and 1000). Most of IPDaemon's properties are array properties indexed by ConnectionId. 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 control 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 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.

This control requires a Winsock 1.1 compliant TCP/IP stack. This means that the Winsock stack installed in the system must have a version of at least 1.1. In particular, Windows 95, 98, and NT machines with Winsock 2.0 are fully supported.


   PROPERTIES

AcceptData. Enables or disables data reception (the DataIn event).

BytesSent. The number of bytes actually sent after an assignment to DataToSend.

ClientSocketHandle. The handle of the socket used by a particular connection.

Connected. Used to disconnect individual connections and/or show their status.

DataToSend. A string of data to be sent to the remote host. Write-only property.

EOL. Used to break the incoming data stream into chunks separated by EOL.

InBufferSize. The size in bytes of the incoming queue of the socket.

KeepAlive. When True, KEEPALIVE packets are enabled (for long connections).

Linger. When set to True, connections are terminated gracefully.

Listening. If True, the control accepts incoming connections on LocalPort.

LocalAddress. The IP address of the interface for ConnectionId in Internet dotted format.

LocalHost. The name of the local host or user-assigned IP interface through which connections are accepted or initiated.

LocalPort. The TCP port in the local host where the control listens.

MaxLineLength. The maximum amount of data to accumulate when no EOL is found.

OutBufferSize. The size in bytes of the outgoing queue of the socket.

RemoteHost. The IP address of the RemoteHost in Internet dotted format.

RemotePort. The IP port of the RemoteHost for a connection.

SocketHandle. The handle of the main socket used by the control.

WinsockInfo. Identifying information about the loaded Winsock stack.

WinsockLoaded. Loads and unloads Winsock on demand.

WinsockMaxDatagramSize. Size in bytes of the largest UDP datagram that can be sent or received.

WinsockMaxSockets. Maximum number of sockets available to a single process.

WinsockPath. The path to the Winsock DLL used.

WinsockStatus. The status of the Winsock stack.

   EVENTS

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 control is ready to send data.


© 1999 devSoft Inc. - All Rights Reserved.
devSoft Inc.,  P.O.Box 13821 , Research Triangle Park, NC 27709 , USA,