View topic - SocketError : on " getservbyname( ) " Please

SocketError : on " getservbyname( ) " Please

anything that doesn't fit to other groups.

SocketError : on " getservbyname( ) " Please

Postby gaz » Thu Feb 05, 2004 6:14 pm

I try to setup my QNX PC as sample server . my program can not get server name form /etc/service . so how to slove it.

sinfo = getservbyname("myserver","tcp");
if (sinfo == NULL) {
printf("ERROR: myserver not found in /etc/services\n");
exit(UNSUPPORTED_SERVICE);
}
gaz
New Member
 
Posts: 1
Joined: Thu Dec 11, 2003 12:23 pm

Postby noc » Thu Feb 05, 2004 7:12 pm

Is "myserver" in /etc/services ?
grep myserver /etc/services
noc
Senior Member
 
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am

grep ???

Postby watcharin » Thu Feb 05, 2004 9:51 pm

what is grep
watcharin
New Member
 
Posts: 8
Joined: Wed Sep 10, 2003 10:20 pm

Postby evanh » Thu Feb 05, 2004 10:21 pm

There is a couple of common ways to lookup command help in qnx.

The first way is the command "use"
eg: use grep
This will, atleast, get you a list of options and maybe more.

The second way is by using the Help system. It's in the Launch menu and at the top of the Shelf and it's real name is "helpviewer". Inside of help you will find the commands all tucked away under QNX Neutrino RTOS -> Utilities Reference. And under the letter G you will find "grep".
evanh
QNX Master
 
Posts: 735
Joined: Sat Feb 01, 2003 8:04 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron