Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by rwniceing
at 2024-09-03 00:01:54
Point:500 Replies:6 POST_ID:829214USER_ID:12079
Topic:
PHP Scripting Language;Apache Web Server;Miscellaneous Networking
Just want to clarify my concept to some terminology on reading articles.As I know socket is connection and communication between client and server-side that we learnt it before on classical C . On php, there is also socket example such as on the socket tutorial link at http://php.net/manual/en/sockets.examples.php
Question-1, all php apache server TCP/IP are implemented by using exact socket function described on the previous link , and the TCP/IP are including http,stmp, ftp,.....telent ..etc.Is it correct ?
Question-2 Websocket is another type of socket that is different from the socket function above, right? It aims to serve for web application such as chat/Game application since needs to bulid persistant connection. Is it correct ? The persisant connection means forever-active connection
that is NOT the same socket connection which is one-time process (create->connect->disconnect->done getting http pages). Is it right ?
Question-3 I found one apache websocket at https://github.com/disconnect/apache-websocket.
People created that apache websocket code because classical php apache doesn't have websocket function idea before so that it aims to create it for the web application(Game and chat app) for old version php apache server. (Probably If the answer to question-2 above is correct, it imply this question-3 answer is also correct)
Please advise
Rwniceing
Question-1, all php apache server TCP/IP are implemented by using exact socket function described on the previous link , and the TCP/IP are including http,stmp, ftp,.....telent ..etc.Is it correct ?
Question-2 Websocket is another type of socket that is different from the socket function above, right? It aims to serve for web application such as chat/Game application since needs to bulid persistant connection. Is it correct ? The persisant connection means forever-active connection
that is NOT the same socket connection which is one-time process (create->connect->disconnect->done getting http pages). Is it right ?
Question-3 I found one apache websocket at https://github.com/disconnect/apache-websocket.
People created that apache websocket code because classical php apache doesn't have websocket function idea before so that it aims to create it for the web application(Game and chat app) for old version php apache server. (Probably If the answer to question-2 above is correct, it imply this question-3 answer is also correct)
Please advise
Rwniceing
Expert: Dave Baldwin replied at 2024-09-03 01:53:03
You're welcome, thanks for the points.
Author: rwniceing replied at 2024-09-03 01:29:45
Thanks for your reply
Accepted Solution
Expert: Dave Baldwin replied at 2024-09-03 01:27:53
250 points EXCELLENT
Yep, that's pretty much it. Sockets are at a very low level and require a lot of work to use them.
Author: rwniceing replied at 2024-09-03 01:06:03
After reading your attached link,
Socket is software and implement TCP/IP protocol described at wiki at http://en.wikipedia.org/wiki/Network_socket
Websocket is other protocol from classical TCP/IP protocol, and it aim to more on long-live-connection or persistant connection application such as chat/game application. And other important usage is also described on wiki link.
For question-2 and question-3, the answer is "yes" or more or less similar to the writing just right above . Apache websocket is also software and implement websocket protocol for HTTP between browser and server application or communication
Dave Baldwin, if you agree it, I will close this thread
Socket is software and implement TCP/IP protocol described at wiki at http://en.wikipedia.org/wiki/Network_socket
Websocket is other protocol from classical TCP/IP protocol, and it aim to more on long-live-connection or persistant connection application such as chat/game application. And other important usage is also described on wiki link.
For question-2 and question-3, the answer is "yes" or more or less similar to the writing just right above . Apache websocket is also software and implement websocket protocol for HTTP between browser and server application or communication
Dave Baldwin, if you agree it, I will close this thread
Author: rwniceing replied at 2024-09-03 00:53:18
so,
Answer -1 all TCP/IP are implemented on socket software function in C. PHP socket just provide similar method interpreted by php script which aims that is convenient for php users for developing their TCP/IP application.
and my concept to websocket on qeustion-2 and 3 is NOT correct ? and I'm NOT asking what the websocket spec is . Please advise kindly
Answer -1 all TCP/IP are implemented on socket software function in C. PHP socket just provide similar method interpreted by php script which aims that is convenient for php users for developing their TCP/IP application.
and my concept to websocket on qeustion-2 and 3 is NOT correct ? and I'm NOT asking what the websocket spec is . Please advise kindly
Assisted Solution
Expert: Dave Baldwin replied at 2024-09-03 00:48:31
250 points EXCELLENT
Answer 1. PHP sockets don't necessarily have anything to do with Apache. The sockets themselves are part of the networking software in the operating system. While basic protocols like HTTP and SMTP are not too hard, FTP gets more difficult because it requires a pair of sockets on different ports and it has a lot of overhead. Protocols like HTTPS and SSH are probably pretty difficult to use because of the overhead for encrypting and decrypting the data. Programs that use those protocols are usually written in C and compiled so they have less overhead than an interpreted language like PHP.
Answer 2+3. 'Websocket' is a specific application of sockets. In the Apache article, it refers to WebSocket protocol (RFC 6455). Like I said above, sockets are part of the networking software in the operating system. http://en.wikipedia.org/wiki/WebSocket
Answer 2+3. 'Websocket' is a specific application of sockets. In the Apache article, it refers to WebSocket protocol (RFC 6455). Like I said above, sockets are part of the networking software in the operating system. http://en.wikipedia.org/wiki/WebSocket