void Create(string ConnectString) |
Stores device path in Device_Name |
void Dispose() |
Public disposal method implementing IDisposable pattern |
IAsyncResult BeginConnect(AsyncCallback cb, object state) |
Queues async connect operation via ThreadPool |
void EndConnect(IAsyncResult ar) |
Opens handles to device, retrieves capabilities, initializes buffers |
static string GetFirstConnectString() |
Enumerates HID devices to find first matching VID/PID; returns device path or empty string |
IAsyncResult BeginDisconnect(bool reuseSocket, AsyncCallback cb, Object state) |
Queues async disconnect operation |
void EndDisconnect(IAsyncResult asyncResult) |
Closes _HIDHandle, _ReadHandle, _WriteHandle; sets _Connected = false |
IAsyncResult BeginSend(byte[] buffer, int offset, int size, AsyncCallback cb, object state) |
Queues async send operation; validates handles first |
int EndSend(IAsyncResult ar) |
Writes data to device via HID output reports; returns total bytes sent |
IAsyncResult BeginReceive(byte[] buffer, int offset, int size, AsyncCallback cb, object state) |
Queues async receive operation; validates handles first |
int EndReceive(IAsyncResult ar) |
Reads HID input report; copies to buffer (skipping first byte); returns bytes read or 0 on failure |
double GetCurrentDownloadRate() |
Returns 0D (stub) |
double GetCurrentUploadRate() |
Returns 0D (stub) |
string GetConnectionData() |
Returns empty string (stub) |
void Bind(int port) |
Throws NotSupportedException |
void Listen(int backlog) |
Throws NotSupportedException |
IAsyncResult BeginAccept(AsyncCallback callback, Object state) |
|