Where can I find a good C++ socket class/library?

G

groleo

Hi.

I've searched a lot on google, but no one seems to develop
a socket class for c++?
I've found a lot of classes that works only on Windows.
The thing is that I need a BSD socket library.
I tried socket++1.1, but i guess that is too old, since it doesen't
compile
on gcc-3.3

So, does any one knows where I can find a good class/library for
sockets, in c++?
 
G

Gregor Razdrtic

Hi.

I've searched a lot on google, but no one seems to develop
a socket class for c++?
I've found a lot of classes that works only on Windows.
The thing is that I need a BSD socket library.
I tried socket++1.1, but i guess that is too old, since it doesen't
compile
on gcc-3.3

So, does any one knows where I can find a good class/library for
sockets, in c++?

I suggest netclass library. It's multiplatform socket, thread library.
http://netclass.sourceforge.net/
 
T

T. Nitschke

Hi.

I've searched a lot on google, but no one seems to develop
a socket class for c++?
I've found a lot of classes that works only on Windows.
The thing is that I need a BSD socket library.
I tried socket++1.1, but i guess that is too old, since it doesen't
compile
on gcc-3.3

So, does any one knows where I can find a good class/library for
sockets, in c++?

http://www.alhem.net/Sockets/index.html
 
D

Drakan

Hi.

I've searched a lot on google, but no one seems to develop
a socket class for c++?
I've found a lot of classes that works only on Windows.
The thing is that I need a BSD socket library.
I tried socket++1.1, but i guess that is too old, since it doesen't
compile
on gcc-3.3

So, does any one knows where I can find a good class/library for
sockets, in c++?

http://sourceforge.net/projects/fedlibrary/
 
A

Alex Vinokur

Hi.

I've searched a lot on google, but no one seems to develop
a socket class for c++?
I've found a lot of classes that works only on Windows.
The thing is that I need a BSD socket library.
I tried socket++1.1, but i guess that is too old, since it doesen't
compile
on gcc-3.3

So, does any one knows where I can find a good class/library for
sockets, in c++?

C++ Stream Compatible TCP/IP Sockets
http://sourceforge.net/projects/cpp-sockets/
 
W

Winbatch



Alex,

Have you tried to compile this on SUN? I get:
make
------------------
rm -f sockets.o
CC -I. -w -D__UNIX__ -DSCREEN_LOG=1 -DMILESTONE_LOG=1 -DTRACE_LOG=0 -c
sockets.cpp
"sockets.h", line 116: Error: TCPSocketWrapper::socket_type is not
accessible from TCPSocketWrapper::TCPAcceptedSocket.
"sockets.h", line 121: Error: TCPSocketWrapper::socket_type is not
accessible from TCPSocketWrapper::TCPAcceptedSocket.
"sockets.cpp", line 107: Error: TCPSocketWrapper::socket_type is not
accessible from TCPSocketWrapper::TCPAcceptedSocket.
"sockets.cpp", line 357: Error: INADDR_NONE is not defined.
4 Error(s) detected.
 
A

Alex Vinokur

Winbatch said:
Alex,

Have you tried to compile this on SUN? I get:
make
------------------
rm -f sockets.o
CC -I. -w -D__UNIX__ -DSCREEN_LOG=1 -DMILESTONE_LOG=1 -DTRACE_LOG=0 -c
sockets.cpp
"sockets.h", line 116: Error: TCPSocketWrapper::socket_type is not
accessible from TCPSocketWrapper::TCPAcceptedSocket.
"sockets.h", line 121: Error: TCPSocketWrapper::socket_type is not
accessible from TCPSocketWrapper::TCPAcceptedSocket.
"sockets.cpp", line 107: Error: TCPSocketWrapper::socket_type is not
accessible from TCPSocketWrapper::TCPAcceptedSocket.
"sockets.cpp", line 357: Error: INADDR_NONE is not defined.
4 Error(s) detected.

Hi,

I have compile that with compiler GNU g++ 3.3.1 on Windows in Cygwin environment (UNIX-like OS).
There were no problems.
I didn't compile it on SUN.

Could you compile that with GNU g++?

Also please look on lines 100-106 in "sockets.h".

Which typedef is actually applied in your system?
 
Joined
May 5, 2010
Messages
1
Reaction score
0
Try NetLink Sockets C++ Library.

The easiest to use and also the more logical. You can do everything in a very easy way (you can check out the examples in its website). You should give it a try.

Features (got from the website):

  • Cross Platform (Linux, OSX, Windows Vista/7)
  • Easy to use
  • Powerful
  • Supports both Ip4 and Ip6
  • RPC (Remote Procedure Call) System
Project site:
http ://sourceforge . net/projects/netlinksockets​

Examples of use:
http ://netlinksockets . sourceforge. net​

(Sorry I can not post links)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,991
Messages
2,570,216
Members
46,802
Latest member
ForestNapi

Latest Threads

Top