IPPort Component [IP*Works! V8]
Properties
Methods
Events
Configuration Settings
The IPPort Component facilitates TCP/IP communications by providing
an easy interface to system TCP/IP functions. It allows a client application to
communicate with a server using stream sockets.
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
Our main goal in designing IPPort was ease of use.
The component has a minimum of properties and five events:
Connected, DataIn, Disconnected, ReadyToSend, and Error.
The events are relatively self-explanatory.
The connection is attempted by calling the Connect method or setting the
Connected property to True, and then waiting for the Connected
event. The destination is defined by setting
RemoteHost and RemotePort. Data is sent by calling the Send method
with Text as a parameter, or by assigning the data string to the
DataToSend property.
To disconnect, you just call the Disconnect method or set the Connected
property to False. The Linger property controls how the connection is
terminated.
The operation of the component is almost completely asynchronous. All the calls
except the ones that deal with domain name resolution operate through asynchronous
messages (no blocking calls). The gain in performance is considerable when
compared to using blocking calls.
Property List
The following is the full list of the properties of the component with short
descriptions. Click on the links for further details.
| |
| AcceptData | Enables or disables data reception (the DataIn event). |
| BytesSent | The number of bytes actually sent after an assignment to DataToSend. |
| Connected | Triggers a connection or disconnection. |
| DataToSend | A string of data to be sent to the remote host. |
| EOL | Used to break the incoming data stream into chunks separated by EOL. |
| FirewallAutoDetect | This property tells the component whether or not to automatically detect and use firewall system settings, if available. |
| FirewallType | This property determines the type of firewall to connect through. |
| FirewallHost | This property contains the name or IP address of firewall (optional). |
| FirewallPassword | This property contains a password if authentication is to be used when connecting through the firewall. |
| FirewallPort | This property contains the TCP port for the firewall Host . |
| FirewallUser | This property contains a user name if authentication is to be used connecting through a firewall. |
| KeepAlive | When True, KEEPALIVE packets are enabled (for long connections). |
| Linger | When set to True, connections are terminated gracefully. |
| 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 IPPort binds. |
| RemoteHost | The address of the remote host. Domain names are resolved to IP addresses. |
| RemotePort | The TCP port in the remote host. |
| SingleLineMode | Special mode for line-oriented protocols. |
| Timeout | A timeout for the component. |
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. |
| Connect | Connects to a remote host. |
| Disconnect | Disconnects from the remote host. |
| DoEvents | Processes events from the internal message queue. |
| GetLine | Gets a line of text from the server. |
| Interrupt | Interrupts the current action. |
| Send | Sends data to the remote host. |
| SendFile | Sends file to the remote host. |
| SendLine | Sends a string followed by a newline. |
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). |
| ConnectionStatus | Fired to indicate changes in connection state. |
| 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 IPPort 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.
| |
| UseIPv6 | Whether or not to use IPv6. |
| MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
| FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
| FirewallHost | Name or IP address of firewall (optional). |
| FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
| FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
| FirewallPort | The TCP port for the FirewallHost;. |
| FirewallUser | A user name if authentication is to be used connecting through a firewall. |
| FirewallType | Determines the type of firewall to connect through. |
| TcpNoDelay | Whether or not to delay when sending packets. |
| AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
| FirewallData | Used to send extra data to the firewall. |
| InBufferSize | The size in bytes of the incoming queue of the socket. |
| OutBufferSize | The size in bytes of the outgoing queue of the socket. |
| CodePage | The system code page used for Unicode to Multibyte translations. |