-
Notifications
You must be signed in to change notification settings - Fork 4
BluetoothClient
This class represents a BluetoothClient.
public static BluetoothClient: BluetoothRaised when the client successfully connects to a server.
public event EventHandler ConnectedIt receives a ClientConnectedEventArgs as the event arguments, which has the following fields:
-
string ServerAddress: The address of the server the client connected to.
Raised when the connection to the server is lost. It does not receive arguments.
public event EventHandler ConnectionLostRaised when the client disconnects from the server.
public event EventHandler DisconnectedConnects to the server with the UUID of a serial port on the device with the MAC address specified in the first argument.
public void Connect(string)Connects to the server with the UUID specified in the second argument on the device with the MAC address specified in the first argument.
public void Connect(string, string)Disconnects from the server.
public void Disconnect()Sends the message specified in the argument to the server it is connected to.
public void Send(string)Message sent to the ServerObject indicating that the connection to the server has been lost.
public const string CONNECTION_LOST = "client.connection_lost";Message sent to the ServerObject indicating that for some reason the client could not connect to the server.
public const string COULD_NOT_CONNECT = "client.error.COULD_NOT_CONNECT";Message sent to the ServerObject indicating that the socket connecting to the server could not be created.
public const string COULD_NOT_CREATE_SOCKET = "client.error.COULD_NOT_CREATE_SOCKET";