Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-19-2004, 02:04 PM   #1
LQ Newbie
Registered: Mar 2004
Posts: 19

Rep: Reputation: 0
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?

Old 03-19-2004, 02:09 PM   #2
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
use teh perror() function, it prints out a string representing the value of errno meaning.
Old 03-19-2004, 07:15 PM   #3
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
Taken from /usr/include/asm/errno.h:

#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.

Last edited by itsme86; 03-19-2004 at 07:17 PM.
Old 03-20-2004, 02:04 AM   #4
LQ Newbie
Registered: Mar 2004
Location: Makhanlal Chaturvedi University, Bhopal, INDIA
Posts: 11

Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD Writer error codes akshunj Linux - Hardware 0 10-16-2005 09:23 PM
Unable to connect to UNIX socket /tmp/.esd/socket error while using grip dr_zayus69 Linux - Software 4 08-23-2005 08:28 PM
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 04:21 PM
Error when building source codes... darkarcon2015 Linux - Software 4 12-22-2004 12:39 AM
isolinux error codes deidre Linux - Newbie 7 02-06-2004 12:50 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration