use the following search parameters to narrow your results:
e.g. subreddit:pics site:imgur.com dog
subreddit:pics site:imgur.com dog
advanced search: by author, sub...
~0 users here now
Technology and related articles and discussion
websocket vs plain socket code
submitted 3 years ago by SubliminalCriminal from self.technology
view the rest of the comments →
[–]iDontShift 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - 3 years ago (1 child)
i duckduckgo'd websocket vs plain socket
WebSockets is made for browser to server communication where you have no access to raw TCP sockets source
another guy asked the same question here
Even though they achieve (in general) similar things, yes, they are really different. WebSockets typically run from browsers connecting to Application Server over a protocol similar to HTTP that runs over TCP/IP. So they are primarily for Web Applications that require a permanent connection to its server. On the other hand, plain sockets are more powerful and generic. They run over TCP/IP but they are not restricted to browsers or HTTP protocol. They could be used to implement any kind of communication. No. There is no reason.
[–]SubliminalCriminal[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - 3 years ago (0 children)
ok, thanks for trying to answer...
a standard http request is where i call up google and i ask them to return a single html file or a text file or a graphics image, etc...
a websockets connection is like an http connection, but it doesnt terminate, both parties can send and receive data... it is geared towards making a chat app, a stock trading app, or other realtime app that needs to send and receive data at high speed on a continuing basis.
thanks for trying.
i am trying to write a custom http web server in C language and now i need to put in the code to handle the websocket upgrade thingy.
view the rest of the comments →
[–]iDontShift 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - (1 child)
[–]SubliminalCriminal[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - (0 children)