Skip to content

Commit

Permalink
add Troubleshooting section for #84 and #95
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Jun 5, 2020
1 parent a31054c commit 36e7d5d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,28 @@ IO.Socket socket = IO.io('http://localhost:3000', <String, dynamic>{
});
```

## Troubleshooting

### Cannot connect "https" server or self-signed certificate server
* Refer to https://github.com/dart-lang/sdk/issues/34284 issue.
The workround is to use the following code provided by @lehno on #84
```
class MyHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext context) {
return super.createHttpClient(context)
..badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
}
}
void main() {
HttpOverrides.global = new MyHttpOverrides();
runApp(MyApp());
}
```


## Notes to Contributors

### Fork socket.io-client-dart
Expand Down

0 comments on commit 36e7d5d

Please # to comment.