forked from cefsharp/CefSharp.OutOfProcess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutOfProcessConnectionTransport.cs
More file actions
43 lines (34 loc) · 1.17 KB
/
OutOfProcessConnectionTransport.cs
File metadata and controls
43 lines (34 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using CefSharp.Dom.Transport;
using System;
using System.Threading.Tasks;
namespace CefSharp.OutOfProcess.WinForms
{
public class OutOfProcessConnectionTransport : IConnectionTransport
{
public int BrowserId { get; }
public bool IsClosed { get; private set; }
public OutOfProcessHost OutOfProcessHost { get; }
public event EventHandler<MessageReceivedEventArgs> MessageReceived;
public event EventHandler<MessageErrorEventArgs> MessageError;
public event EventHandler Disconnected;
public OutOfProcessConnectionTransport(int browserId, OutOfProcessHost outOfProcessHost)
{
BrowserId = browserId;
OutOfProcessHost = outOfProcessHost;
}
void IDisposable.Dispose()
{
}
public void InvokeMessageReceived(string message)
{
MessageReceived?.Invoke(this, new MessageReceivedEventArgs(message));
}
public Task SendAsync(string message)
{
return OutOfProcessHost.SendDevToolsMessageAsync(BrowserId, message);
}
public void StopReading()
{
}
}
}