LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sockets on RH 9.0 (https://www.linuxquestions.org/questions/linux-newbie-8/sockets-on-rh-9-0-a-278992/)

rjs2006 01-17-2005 03:47 PM

Sockets on RH 9.0
 
I am trying to write a very simple sockets application. These are the files I am including.
Anything calls to anything defined in the sockets.h is ...undefined.

I have inclueded the following.

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>

I get messages about 'socket' being undeclared as well as 'closesocket'. Can someone post a simple example of just creating and then closing a socking in Linux. I'm using RedHat 9.0 and the Anjuta IDE.

I am coming from the windows world were I would include "sockets.h" and link to the wsock_32.lib. What is the equiv. procedure in the Linux/Unix world?


Thanks,

Bob

foo_bar_foo 01-17-2005 10:16 PM

it's a little hard to explain without seeing what you are doing
try downloading this book
http://www.advancedlinuxprogramming.com/


All times are GMT -5. The time now is 02:10 PM.