Quantcast

Maximum PC

It is currently Sat Nov 29, 2014 1:12 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Socket Programming in C
PostPosted: Thu Apr 23, 2009 7:49 pm 
Smithfield
Smithfield

Joined: Sun Jun 18, 2006 7:37 pm
Posts: 5472
Can anyone explain basic socket programming in C? Apparently my networking class has a socket programming assignment, but the professor didn't teach anything about it (the professor basically expects us to copy and paste code at this point).

Basically all I need to do is run a client and server program. The client program is sending a struct, the server is modifying that data and sending it back. I can take care of the data modification, but I have no idea how to connect to a socket and send data.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 3:41 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Linux? Windows? Etc?

http://www.linuxhowtos.org/C_C++/socket.htm
http://cs.baylor.edu/~donahoo/practical ... tcode.html
http://www.cs.cf.ac.uk/Dave/C/node28.ht ... 0000000000
http://www.example-code.com/vcpp/socket.asp


http://tinyurl.com/crggvd


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 9:40 am 
Smithfield
Smithfield

Joined: Sun Jun 18, 2006 7:37 pm
Posts: 5472
It's for Linux. Thanks though, I'll have a look at these.


Top
  Profile  
 
 Post subject:
PostPosted: Fri May 01, 2009 6:15 pm 
Smithfield
Smithfield

Joined: Sun Jun 18, 2006 7:37 pm
Posts: 5472
Well I got the assignment done for the most part, but I have a nagging issue.

Is it possible to send non char* data over a write() or read()?


Top
  Profile  
 
 Post subject:
PostPosted: Mon May 04, 2009 4:09 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Like what do you want to send?


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.