Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Problem with sockets: (3 Items)
   
Problem with sockets  
I'm trying to use a server socket in a process, the code compiles without errors or warnings, however when I run it I 
get:

ESRCH No such process

This is after creating the socket:

errno = EOK;
intSocket = socket( AF_INET, SOCK_STREAM, 0 );
intErr = errno;
printf( "ERROR = %s\n", strerror(intErr) );

According to the hellp http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/s/socket.html

This isn't an error listed for this routine.  What do I need to do to resolve this problem?

I've checked /bin, libsocket.so, libsocket.so.2, npm-tcpip-v4.so and npm_tcpip.so are all present.

Thank you
Re: Problem with sockets  
What is intSocket?  You shouldn't look at errno
unless the return from socket() is -1.  If it's
-1 make sure 'io-net -ptcpip ...' is running.


-seanb

On Wed, Feb 22, 2012 at 06:03:19AM -0500, Simon Platten wrote:
> I'm trying to use a server socket in a process, the code compiles without errors or warnings, however when I run it I 
get:
> 
> ESRCH No such process
> 
> This is after creating the socket:
> 
> errno = EOK;
> intSocket = socket( AF_INET, SOCK_STREAM, 0 );
> intErr = errno;
> printf( "ERROR = %s\n", strerror(intErr) );
> 
> According to the hellp http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/s/socket.html
> 
> This isn't an error listed for this routine.  What do I need to do to resolve this problem?
> 
> I've checked /bin, libsocket.so, libsocket.so.2, npm-tcpip-v4.so and npm_tcpip.so are all present.
> 
> Thank you
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post91702
> 
Re: Problem with sockets  
intSocket is just defined as:

int intSocket

The error display code is just they're because I know they're is a problem and I wanted to display it.

I've moved on a little since the initial post, I've now edit /etc/services and added an entry

http  80/tcp

Having done this the error returned is now 243, Protocol not configured or not supported

So I'm thinking that something more is missing from our build.