LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2005, 03:47 PM   #1
rjs2006
LQ Newbie
 
Registered: Jan 2005
Location: New York
Distribution: RedHat 9.0
Posts: 1

Rep: Reputation: 0
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
 
Old 01-17-2005, 10:16 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

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


Reply


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
c and sockets Matir Programming 4 03-09-2005 04:15 PM
sockets pantera Programming 6 11-24-2004 06:28 AM
Sockets sibtay Programming 4 10-08-2004 09:33 AM
sockets santiagosilva Linux - Networking 0 02-14-2004 07:09 PM
sockets andox Programming 4 07-05-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:05 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