LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-19-2004, 01:04 PM   #1
kris273
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?

Kris
 
Old 03-19-2004, 01:09 PM   #2
infamous41md
Member
 
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, 06:15 PM   #3
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

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

Last edited by itsme86; 03-19-2004 at 06:17 PM.
 
Old 03-20-2004, 01:04 AM   #4
mcp_achindra
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.
 
  


Reply



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 08:23 PM
Unable to connect to UNIX socket /tmp/.esd/socket error while using grip dr_zayus69 Linux - Software 4 08-23-2005 07: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 03:21 PM
Error when building source codes... darkarcon2015 Linux - Software 4 12-21-2004 11:39 PM
isolinux error codes deidre Linux - Newbie 7 02-06-2004 11:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:21 PM.

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