View the Most Wanted LQ Wiki articles.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

Rep: Reputation: Disabled
client -server c programming


Last edited by batman4; 09-14-2012 at 12:33 AM.
Old 09-11-2012, 03:26 AM   #2
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 6,367

Rep: Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721Reputation: 1721
Old 09-11-2012, 09:04 AM   #3
Senior Member
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 2,515

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

Rep: Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332
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
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904
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.



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:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration