Listens for connections from Bluetooth network clients.
| C# | Visual Basic |
public class BluetoothListener
Public Class BluetoothListener
| All Members | Constructors | Methods | Properties | ||
| Icon | Member | Description |
|---|---|---|
| BluetoothListener(Guid) |
Initializes a new instance of the BluetoothListener class
to listen on the specified service identifier.
| |
| BluetoothListener(BluetoothAddress, Guid) |
Initializes a new instance of the BluetoothListener class
that listens for incoming connection attempts on the specified local Bluetooth address and service identifier.
| |
| BluetoothListener(BluetoothEndPoint) |
Initializes a new instance of the BluetoothListener class
with the specified local endpoint.
| |
| BluetoothListener(Guid, array<Byte>[]()[], Int32) |
Initializes a new instance of the BluetoothListener class
to listen on the specified service identifier,
publishing the specified SDP record.
| |
| BluetoothListener(BluetoothAddress, Guid, array<Byte>[]()[], Int32) |
Initializes a new instance of the BluetoothListener class
that listens for incoming connection attempts on the specified local Bluetooth address and service identifier,
publishing the specified SDP record.
| |
| BluetoothListener(BluetoothEndPoint, array<Byte>[]()[], Int32) |
Initializes a new instance of the BluetoothListener class
with the specified local endpoint,
publishing the specified SDP record.
| |
| BluetoothListener(Guid, ServiceRecord) |
Initializes a new instance of the BluetoothListener class
to listen on the specified service identifier,
publishing the specified SDP record.
| |
| BluetoothListener(BluetoothAddress, Guid, ServiceRecord) |
Initializes a new instance of the BluetoothListener class
that listens for incoming connection attempts on the specified local Bluetooth address and service identifier,
publishing the specified SDP record.
| |
| BluetoothListener(BluetoothEndPoint, ServiceRecord) |
Initializes a new instance of the BluetoothListener class
with the specified local endpoint,
publishing the specified SDP record.
| |
| AcceptBluetoothClient()()() |
Creates a client object for a connection when the specified service or endpoint is detected by the listener component.
| |
| AcceptSocket()()() |
Creates a new socket for a connection.
| |
| Authenticate |
Gets or sets the authentication state of the current connect or behaviour to use when connection is established.
| |
| BeginAcceptBluetoothClient(AsyncCallback, Object) |
Begins an asynchronous operation to accept an incoming connection attempt.
| |
| BeginAcceptSocket(AsyncCallback, Object) |
Begins an asynchronous operation to accept an incoming connection attempt.
| |
| Encrypt |
On unconnected sockets, enforces encryption to establish a connection.
Encryption is only available for authenticated connections.
For incoming connections, a connection for which encryption cannot be established is automatically rejected and returns WSAEHOSTDOWN as the error.
For outgoing connections, the connect function fails with WSAEACCES if encryption cannot be established.
In response, the application may prompt the user to authenticate the two Bluetooth devices before connection.
| |
| EndAcceptBluetoothClient(IAsyncResult) |
Asynchronously accepts an incoming connection attempt and creates a new BluetoothClient to handle remote host communication.
| |
| EndAcceptSocket(IAsyncResult) |
Asynchronously accepts an incoming connection attempt and creates a new Socket to handle remote host communication.
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetHashCode()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| LocalEndPoint |
Gets the underlying BluetoothEndPoint of the current BluetoothListener.
| |
| MemberwiseClone()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Pending()()() |
Determines if there is a connection pending.
| |
| Server |
Gets the underlying network Socket.
| |
| ServiceClass |
Get or set the Service Class flags that this service adds to the host
device’s Class Of Device field.
| |
| ServiceName |
Get or set the ServiceName the server will use in its SDP Record.
| |
| ServiceRecord |
Returns the SDP Service Record for this service.
| |
| SetPin(BluetoothAddress, String) |
Set or change the PIN to be used with a specific remote device.
| |
| Start()()() |
Starts listening for incoming connection requests.
| |
| Start(Int32) |
Starts listening for incoming connection requests with a maximum number of pending connection.
| |
| Stop()()() |
Stops the socket from monitoring connections.
| |
| ToString()()() | (Inherited from Object.) |
The BluetoothListener class provides simple methods that listen for and accept incoming connection requests in blocking synchronous mode.
You can use either a BluetoothClient or a Socket to connect with a BluetoothListener
| Object | |
| BluetoothListener | |