LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Socket Error codes (https://www.linuxquestions.org/questions/programming-9/socket-error-codes-159871/)

kris273 03-19-2004 01:04 PM

Socket Error codes
 
Well I'm using a socket server program that I made, it seems to work untill I send the second message, then i get a "status == -1 errno == 9 in Socket::recv" which is an error code of sorts, for the socket, but is there a place to look up to figure out what these codes mean?

Kris

infamous41md 03-19-2004 01:09 PM

use teh perror() function, it prints out a string representing the value of errno meaning.

itsme86 03-19-2004 06:15 PM

Taken from /usr/include/asm/errno.h:

Code:

#define EPERM            1      /* Operation not permitted */
#define ENOENT          2      /* No such file or directory */
#define ESRCH            3      /* No such process */
#define EINTR            4      /* Interrupted system call */
#define EIO              5      /* I/O error */
#define ENXIO            6      /* No such device or address */
#define E2BIG            7      /* Arg list too long */
#define ENOEXEC          8      /* Exec format error */
#define EBADF            9      /* Bad file number */
#define ECHILD          10      /* No child processes */
#define EAGAIN          11      /* Try again */
#define ENOMEM          12      /* Out of memory */

And this is taken from 'man recv':
EBADF The argument s is an invalid descriptor.

mcp_achindra 03-20-2004 01:04 AM

Hay Kris, if you could list your program code of client and server, that would be of great help to me. I have been writing the client server code, but still I am unable to communicate. Moreover I am unable to handle the error, if you could help me.

Better if you could help me by sending code in personel.


All times are GMT -5. The time now is 04:31 AM.