简体   繁体   English

PHP套接字/ TCP套接字

[英]php sockets / tcp sockets

Can someone explain what really happens when we create a socket like : 有人可以解释一下当我们创建一个套接字时发生了什么吗:

$socket = socket_create(AF_INET, SOCK_RAW, 1); and

socket_send($socket, $package, strLen($package), 0); .

What really happens at the Operating System Level (behind the scene) ? 在操作系统级别(幕后)真正发生了什么?

The whole point of sockets is that you don't have to know about what is going on behind the scene. 套接字的全部目的是您不必知道幕后发生的事情。 Hence the name -- Socket API. 因此,名称为Socket API。 If you really must know then turn to the sources, let's say FreeBSD, because I'm not sure about Windows sources. 如果您真的必须知道,然后转向源代码,就说FreeBSD,因为我不确定Windows源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM