Asked by rwniceing
at 2024-09-06 07:39:42
Point:500 Replies:6 POST_ID:829223USER_ID:12079
Topic:
Network Operations;Networking Protocols;Miscellaneous Networking
I tried one socket tutorial example as following code on my window 7 for getting webpage from remote sites or localhost that is successful. TCP is at transport layer and IP is at network layer. When doing the socket_create(), we need to know protocol number such as "0" for IP and "6" for TCP.
Question-1 Why I tried either socket_create(AF_INET, SOCK_STREAM, 0) or
socket_create(AF_INET, SOCK_STREAM, 6) on the code, both are worked and outpage webpage are
same ? If both work, IP and TCP protocol spec is no different , Right ?
Question-2. This php program code, we treat it at transport or network layer or both layer together ?
Question-3 Our computer network card is handling Data layer and network layer(IP) and Transport layer(TCP) all together , right ?
Those protocol is shown into each layer descibed at this link ,http://www.protocols.com/pbook/tcpip1.htm
Please advise
Rwniceing
Question-1 Why I tried either socket_create(AF_INET, SOCK_STREAM, 0) or
socket_create(AF_INET, SOCK_STREAM, 6) on the code, both are worked and outpage webpage are
same ? If both work, IP and TCP protocol spec is no different , Right ?
Question-2. This php program code, we treat it at transport or network layer or both layer together ?
Question-3 Our computer network card is handling Data layer and network layer(IP) and Transport layer(TCP) all together , right ?
Those protocol is shown into each layer descibed at this link ,http://www.protocols.com/pbook/tcpip1.htm
Please advise
Rwniceing