LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-11-2012, 03:16 AM   #1
batman4
Member
 
Registered: Jul 2012
Posts: 47

Rep: Reputation: Disabled
client -server c programming


abc

Last edited by batman4; 09-14-2012 at 12:33 AM.
 
Old 09-11-2012, 03:26 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,929

Rep: Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306
http://stackoverflow.com/questions/1...rom-and-sendto
 
Old 09-11-2012, 09:04 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,819

Rep: Reputation: 505Reputation: 505Reputation: 505Reputation: 505Reputation: 505Reputation: 505
yes, we can
 
Old 09-12-2012, 10:24 AM   #4
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,401

Rep: Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119
You probably shouldn't be approaching the task at such a low level, because this is "a thing already done." I repeat: you don't need to repeatedly repeat yourself, yourself. Go find a much higher-level protocol that "already does" everything that you need to do, and let those libraries do the socket-twiddling for you.
 
Old 09-13-2012, 09:36 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
sundialsvcs, it is entirely possible that the OP is implementing an well defined protocol, or perhaps an ill defined protocol that is already in use, and which needs to be implemented on his platform. There are many existing communications protocols for which little or no support exists. Don't forget that in the beginning, someone had to write each of those libraries that does the socket-twiddling. If the OP is in fact creating his/her own new protocol, then your advice is well placed.
I would point out that when doing what the OP is proposing, it is prudent to pay attention to the likes of endian-ness and to packing/alignment of structures on various architectures and by various compilers and compiler versions.
--- rod.
 
  


Reply

Tags
clientserver


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
help needed in client/server programming rahb20 Programming 3 10-06-2008 07:23 PM
Interactive Client / Server Programming CyberEd Programming 8 08-31-2007 11:47 AM
OpenGL programming using server/client jmeza Programming 1 10-02-2006 05:01 PM
Client-Server Programming Mohsen Programming 4 07-15-2003 01:58 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration