Header Error => Connection closed before full header was received.
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 419
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 8
Description
How to fix the error?
I have been used The Library => **web_socket_channel: ^1.0.12** ([Library Link](https://pub.dartlang.org/packages/web_socket_channel#-readme-tab-))
Error Output
> WebSocketChannelException: WebSocketChannelException: HttpException: Connection closed before full header was received, uri = http://192.168.1.106
My Socket Code
```
WebSocketChannel channel = **IOWebSocketChannel.connect("ws://192.168.1.106:80");**
channel.stream.listen(
(data) {
print("Socket: data => " + data.toString());
},
onError: (error) {
print("Socket: error => " + error.toString());
},
onDone: () {
print("Socket: done");
},
);
```
This way I am sending a message.
```
channel.sink.add(/*data*/);
```
Where is my mistake?
Contributor guide
Assessment
This issue has not been assessed yet.