BTDaemon Class
Properties Methods Events Configuration Settings Errors
A Bluetooth server class based on a high-performance, asynchronous, event-driven architecture.
Syntax
BTDaemon
Remarks
The BTDaemon component implements a light-weight Bluetooth server. To begin listening for connections set Protocol and LocalPort, then set Listening to true. When a client connects the ConnectionRequest event will fire. If the incoming connection is accepted the Connected event will fire.
Once a connection is established the DataIn event will fire with data received from the client. To send data set DataToSend or call Send, SendLine, or SendFile.
Clients may be disconnected by calling Disconnect.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
ConnectionBacklog | The maximum number of pending connections maintained by the Bluetooth 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 class 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. |
IdleTimeout | The idle timeout for this connection. |
LocalAddress | This property shows the IP address of the interface through which the connection is passing. |
ReadyToSend | Indicates whether the class is ready to send data. |
RecordLength | If set to a positive value, this setting defines the length of data records to be received. |
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 specifies a timeout for the class. |
UserData | The UserData property holds connection specific user specified data. |
DefaultEOL | A default EOL value to be used by incoming connections. |
DefaultMaxLineLength | The default maximum line length value for inbound connections. |
DefaultSingleLineMode | Tells the class whether or not to treat new connections as line-oriented. |
DefaultTimeout | An initial timeout value to be used by incoming connections. |
Listening | If True, the class accepts incoming connections on LocalPort. |
LocalHost | The address of the Bluetooth device through which connections are initiated or accepted. |
LocalPort | The port in the Bluetooth device on which the class listens. |
Protocol | The Bluetooth protocol to be used. |
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. |
SSLEnabled | Whether TLS/SSL is enabled. |
SSLStartMode | Determines how the class starts the SSL negotiation. |
Method List
The following is the full list of the methods of the class 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 class 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 class is ready to send data. |
SSLClientAuthentication | Fired when the client presents its credentials to the server. |
SSLConnectionRequest | Fires when an SSL connection is requested. |
SSLStatus | Shows the progress of the secure connection. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
BTAuthenticate | Whether authentication is required. |
BTDefaultMTU | The default RFCOMM MTU (Maximum Transmission Unit). |
BTEncrypt | Forces an encrypted connection if set to True. |
BTMTUMax | The maximum RFCOMM MTU (Maximum Transmission Unit). |
BTMTUMin | The minimum RFCOMM MTU (Maximum Transmission Unit). |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |