Jump to content

php sockets classes


steven_84

Recommended Posts

HI,

I having been using sockets and wanted to split the connection class i have into to seperate functions.

but when i do i get errors i think its because the information is being passed between the functions, but I have been unable to work out how to do this

in the first function i have the socket_create, socket_bind and socket_listen commands and in the second function i have the socket_accept and socket_getpeername.

the errors i have been getting have been

"Warning: socket_accept() expects parameter 1 to be resource, null given in"

any ideas?

thanks
steven
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.