hthy46vbs
hthy46vbs

Reputation: 179

abstract library for easier socket programming under linux

I have to program a server client logic for 2 application, with this conditions:

I was hoping that there is a library that can help me with this to keep my work simple.

I want to stress the fact that i have to use only the headers like sys/socket.h related to socket programming and no other dependecy.

Thanks.

Upvotes: 0

Views: 835

Answers (3)

goji
goji

Reputation: 7122

I personally prefer poco over boost.asio: http://pocoproject.org/ but it's still going to be dependency!

Upvotes: 1

Andy Ross
Andy Ross

Reputation: 12051

First, the Berkeley sockets interface really isn't difficult to use, though it's perhaps a little crufty by modern standards. But if you really want something simpler how about text I/O using something like netcat, avoiding doing socket level programming at all and replacing it with simple process spawning and piping? Or make your "deadly simple" protocol a HTTP transaction and use a simple CGI script and curl/wget (or libcurl) on the client?

There are lots of simple ways to move data over the network that don't involve crufty C APIs. Which to choose depends on what it is you're trying to do.

Upvotes: 1

piokuc
piokuc

Reputation: 26204

Your requirements are a bit inconsistent, because normally a library is a dependency.

Libraries fulfilling your other requirements: Boost.Asio, http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio.html, and ACE (adaptive communication environment), http://www.cs.wustl.edu/~schmidt/ACE.html.

Upvotes: 1

Related Questions