doukuipai8544 2013-07-31 13:23
浏览 56

在PHP服务器套接字编程中无法绑定相同的端口

I am trying to bind socket with same port, I am getting error.

socket_bind(): unable to bind address [0]: Only one usage of each socket address (protocol/network address/port) is normally permitted. in C:\xampp\htdocs\my\server.php on line 79 Could not bind to socket

Here is 79-th line:

$result = socket_bind($socket, $host, $port) or die("Could not bind to socket
");

How to fix this?

  • 写回答

2条回答 默认 最新

  • du2986 2013-07-31 13:35
    关注

    I am trying to bind socket with same port

    Use a different port or kill the application that is bound to the port you are trying to bind to. Generally speaking only 1 application can be bound to a port at a time.

    netstat -O is used to find ports that are in use via cmd in windows.

    评论

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作