mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 19:05:08 +00:00
LibWebView+LibProtocol: Allow app to pass custom WebSocketClients
This commit is contained in:
parent
a1e5a6ac40
commit
dd694215bc
3 changed files with 8 additions and 2 deletions
|
@ -107,6 +107,11 @@ void WebSocketClientSocketAdapter::close(u16 code, DeprecatedString reason)
|
|||
m_websocket->close(code, reason);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<WebSocketClientManagerAdapter>> WebSocketClientManagerAdapter::try_create(NonnullRefPtr<Protocol::WebSocketClient> websocket_client)
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) WebSocketClientManagerAdapter(move(websocket_client)));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<WebSocketClientManagerAdapter>> WebSocketClientManagerAdapter::try_create()
|
||||
{
|
||||
auto websocket_client = TRY(Protocol::WebSocketClient::try_create());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue