Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:24:50+00:00 2026-06-08T08:24:50+00:00

I have a socket error when running the socket_recv inside this function: function readByteXByteSIBmsg()

  • 0

I have a socket error when running the socket_recv inside this function:

function readByteXByteSIBmsg() {
    $msg = "";
    $buf="";
    try {
     while( $ret=socket_recv($this->kpSocket,$buf,8192,0)){
        $msg.=$buf;
        if($ret<8192) break;
     }


    $this->deb_print("KpCore:readByteXByteSIBmsg:READ LOOP TERMINATED");
    } catch (Exception $e) {
        err_print("KPICore:readByteXByteSIBmsg:Exception on EVENT  HANDLER:RECEIVE:\n" . $e);
        $this->$KP_ERROR_ID = $this->ERR_SOCKET_TIMEOUT;
    }
    return $msg;
}

This is the text of the error:

PHP Warning:  socket_recv(): unable to read from socket [11]: Resource temporarily unavailable in /home/luca/Documenti/Tesi/M3 Agent Page/lib/KPICore.php on line 236

(line 236 is the line with the socket_recv call)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:24:51+00:00Added an answer on June 8, 2026 at 8:24 am

    The error is EAGAIN (or EWOULDBLOCK, sometimes those are the same error) and means that the socket is non-blocking and that there is nothing to read at the moment. You can busy-wait while you have that error until you read something, or you use some other method to find out if there is data to read before trying to receive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an error during compiling: raja@raja-desktop:~/socket$ g++ Socket.cpp Socket.cpp: In member function ‘int
I have a basic Socket.io server setup like this: var server = express.createServer().listen(port); this.io
I have a Windows 7 machine with an Ubuntu 11.10 vm running inside it
I have a windows server running IIS and node.js with socket.io for an interactive
I have a socket server running on an android device. Then from a client
I have a socket server running on multiple machines. It works like a charm
so - I have this Socket (not XMLSocket, just Socket) client. I also have
I have a socket.io server listening for certain events on sockets. Whenever an event
I have c++ socket server and android client. Server constantly sends data to the
I have a socket application which I can use in local network, at home.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.