Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Eduardo Florence
2020-12-12 23:25:47 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
af76035e8f2ec93fdcaf6689fbc505e279a5dc5c
af76035e
1 parent
7ffe84fd
Added the allowSelfSigned parameter to GetSocket
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
lib/get_connect/sockets/sockets.dart
lib/get_connect/sockets/src/sockets_io.dart
lib/get_connect/sockets/src/sockets_stub.dart
lib/get_connect/sockets/sockets.dart
View file @
af76035
...
...
@@ -6,5 +6,6 @@ class GetSocket extends BaseWebSocket {
GetSocket
(
String
url
,
{
Duration
ping
=
const
Duration
(
seconds:
5
),
})
:
super
(
url
,
ping:
ping
);
bool
allowSelfSigned
=
true
})
:
super
(
url
,
ping:
ping
,
allowSelfSigned:
allowSelfSigned
);
}
...
...
lib/get_connect/sockets/src/sockets_io.dart
View file @
af76035
...
...
@@ -18,9 +18,13 @@ class BaseWebSocket {
WebSocket
socket
;
SocketNotifier
socketNotifier
=
SocketNotifier
();
bool
isDisposed
=
false
;
BaseWebSocket
(
this
.
url
,
{
this
.
ping
=
const
Duration
(
seconds:
5
)});
BaseWebSocket
(
this
.
url
,
{
this
.
ping
=
const
Duration
(
seconds:
5
),
this
.
allowSelfSigned
=
true
,
});
Duration
ping
;
bool
allowSelfSigned
=
true
;
bool
allowSelfSigned
;
ConnectionStatus
connectionStatus
;
...
...
lib/get_connect/sockets/src/sockets_stub.dart
View file @
af76035
class
BaseWebSocket
{
String
url
;
Duration
ping
;
BaseWebSocket
(
this
.
url
,
{
this
.
ping
=
const
Duration
(
seconds:
5
)})
{
bool
allowSelfSigned
;
BaseWebSocket
(
this
.
url
,
{
this
.
ping
=
const
Duration
(
seconds:
5
),
allowSelfSigned
=
true
,
})
{
throw
'To use sockets you need dart:io or dart:html'
;
}
...
...
Please
register
or
login
to post a comment