Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My code is like this:

if( ($this->master=socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) < 0 )

    {
    die("socket_create() failed, reason: ".socket_strerror($this->master));
    }

when I run my php file which create connection with web socket, I got error Fatal error: Call to undefined function socket_create() in the line if( ($this->master=socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) < 0 )

Therefore i am not able to connect web socket and also not able to get response message from socket because Socket Status: 3 (Closed) is displaying in my browser when run client page .

Have you got an idea what is missing? Thank you in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
432 views
Welcome To Ask or Share your Answers For Others

1 Answer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...