Here is my code: enter image description here I make a socket connection by usual,and just want to send the headers. And the //was the headers which I had tired to add,but it did not work. could anyone give me some advices?
Asked
Active
Viewed 51 times
1 Answers
0
You can't just open a socket and hope for the best - you have to actually implement the protocol!
The host is 127.0.0.1
. 127.0.0.1/test
is not a host; TCP/IP has no earthly idea what to do with that information. Your WebSockets implementation (or, ideally, an existing one that you use) will know how to handle the URL 127.0.0.1/test
after opening a socket to 127.0.0.1
.

Lightness Races in Orbit
- 378,754
- 76
- 643
- 1,055
-
Well,I have found the libs to handle this on linux,but I has not found any lib or other information to describe how to deal with the the whole url above. – zhaihaixu Jan 08 '19 at 15:26
-
And I have made the websocket package by streamstring,maybe I should read some api on MSDN? – zhaihaixu Jan 08 '19 at 15:30