LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   client -server c programming (https://www.linuxquestions.org/questions/programming-9/client-server-c-programming-4175426658/)

batman4 09-11-2012 03:16 AM

client -server c programming
 
abc

pan64 09-11-2012 03:26 AM

http://stackoverflow.com/questions/1...rom-and-sendto

NevemTeve 09-11-2012 09:04 AM

yes, we can

sundialsvcs 09-12-2012 10:24 AM

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.

theNbomr 09-13-2012 09:36 AM

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.


All times are GMT -5. The time now is 12:58 AM.