javascript - Can C# connect to a WebSocket using Socket(Not WebSocket) class -
i have c#
app communicates on socket. want code web app can connect c#
app on socket. know c# has different classes websocket
, socket
.
questions :
1-) if use websocket
javascript
, can connect existing socket
structure on c#
or required re-code websocket
?
2-) there other performance efficent way ?
a websocket connection uses socket, predefined way of framing data, while if use socket directly, can define own way of framing data, other end must know how data framed in order understand it.
answering question: in javascript can connect sockets running websocket, since websocket javascript client try communicate in "websocket" way , won't understand different.
however, if need javascript access regular socket, can try use intermediary proxy websockify, cannot connect directly.
Comments
Post a Comment