MLLPClient Component
Properties Methods Events Configuration Settings Errors
The MLLPClient component implements the client side of the Minimal Lower Layer Protocol.
Syntax
nsoftware.IPWorksEDI.Mllpclient
Remarks
The MLLPClient component is used to exchange HL7 data with an MLLP server.
Connecting
To begin using the MLLPClient component, connect to an MLLP server. Connecting is simple, start by setting the SSLEnabled property to True if desired. Then either set the RemoteHost and RemotePort properties before setting the Connected property to True; or simply call the Connect method, passing it the remote host and port values directly.
When the MLLPClient first connects to the server, the Connected event fires. Additional information about the status of the connection can be accessed through the ConnectionStatus event. If the SSLEnabled property is True the SSLServerAuthentication and SSLStatus events will also fire.
Connecting Example
mllpClient.RemoteHost = "MyHostNameOrIP"; mllpClient.RemotePort = 777; mllpClient.SSLEnabled = true; mllpClient.Connected = true;
Sending Data
Once connected, specify the HL7 data to send by doing one of the following:
- Call the SetInputStream method, passing it a stream with HL7 data.
- Set the InputFilename property to the path of a file with HL7 data.
- Set the HL7 data directly to the InputData property.
Once the data has been specified, simply call the Send method to send the HL7 data to the server. Once the server has received the data, it will respond with an acknowledgement, causing the component's AckIn event to fire.
Sending Data Example
mllpClient.InputData = "HL7Data"; mllpClient.Send();
Receiving Data
The MLLPClient component will automatically receive HL7 data sent from the server, and will automatically send an acknowledgement back.
When the MLLPClient component is receiving data, immediately before data transfer begins the StartTransfer event fires. During data transfer, one or more Transfer events will fire. When data transfer is complete, the EndTransfer event fires. Any errors during data delivery will cause the Error event to fire.
Immediately before the client acknowledgement is sent the AckOut event fires. The Accept parameter of this event is used to determine the type of acknowledgement (ACK or NAK) to send back to the server.
HL7 data received by the MLLPClient component will be stored in one of the following ways:
- If an output stream has been specified using the SetOutputStream method, the data is written to that stream.
- Otherwise, if an output file path has been set to the OutputFilename property, the data is written to that file.
- Otherwise, the data is stored in the OutputData property.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Connected | Triggers a connection or disconnection. |
Firewall | A set of properties related to firewall access. |
InputData | The raw HL7 data to send. |
InputFilename | The path of a file containing HL7 data to send. |
KeepAlive | When True, KEEPALIVE packets are enabled (for long connections). |
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 binds. |
OutputData | The raw HL7 data received. |
OutputFilename | The path of a file in which to store received HL7 data. |
RemoteHost | The address of the remote host. Domain names are resolved to IP addresses. |
RemotePort | The TCP port in the remote host. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLEnabled | Whether TLS/SSL is enabled. |
SSLServerCert | The server certificate for the last established connection. |
Timeout | A timeout for the component. |
Version | The MLLP version to use. |
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. |
Interrupt | Interrupts the current action. |
Reset | Reset the component. |
Send | Sends HL7 data to the MLLP server. |
SetInputStream | Specifies a stream containing HL7 data to send. |
SetOutputStream | Specifies a stream to which received HL7 data should be written. |
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.
AckIn | Fires immediately after receiving an acknowledgement from the server. |
AckOut | Fires immediately before sending an acknowledgement to the server. |
Connected | Fired immediately after a connection completes (or fails). |
ConnectionStatus | Fired to indicate changes in connection state. |
Disconnected | Fired when a connection is closed. |
EndTransfer | Fires after incoming HL7 data finishes transferring. |
Error | Information about errors during data delivery. |
Log | Provides logging information. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
StartTransfer | Fires before incoming HL7 data begins transferring. |
Transfer | Fires during incoming data transfer. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
ACKChar | The positive acknowledgement character. |
EndBlockChar | The character that denotes the end of HL7 data. |
EOLChar | The character that denotes the end of a message block. |
LogLevel | The level of detail that is logged. |
NAKChar | The negative acknowledgement character. |
ReceiveTimeout | Maximum number of seconds to wait after receiving a StartBlockChar. |
StartBlockChar | The character that denotes the beginning of HL7 data. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
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;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLNegotiatedCipher | Returns the negotiated ciphersuite. |
SSLNegotiatedCipherStrength | Returns the negotiated ciphersuite strength. |
SSLNegotiatedCipherSuite | Returns the negotiated ciphersuite. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedVersion | Returns the negotiated protocol version. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLServerCACerts | A newline separated list of CA certificate to use during SSL server certificate validation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
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. |
BuildInfo | Information about the product's build. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
LicenseInfo | Information about the current license. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |