-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
88 lines (57 loc) · 2.41 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
C++ Sockets Library :: installation instructions
Unix (and Cygwin/Mingw on windows)
==================================
1. Change the 'PLATFORM =' line in Makefile
Possible values are
linux-x86-32
win32-cygwin
solaris9-sparc-64
macosx
solaris8
2. If you want to use ssl encrypted socket communication, the library
has support for the third-party library openssl. If necessary, add
the following include directory to Makefile:
INCLUDE = -I<path to openssl>/include
The openssl include directory contains only one directory named
'openssl', in which all header files can be found.
OpenSSL support is enabled by default.
If you don't need encrypted communications, make sure to comment
out this line in the file 'sockets-config.h':
#define HAVE_OPENSSL
3. If you really need thread-safe dns lookups, and your operating has
support for *addrinfo and *nameinfo function calls, make sure this
line in 'sockets-config.h' is commented:
#define NO_GETADDRINFO
By default, dns lookups using getaddrinfo/getnameinfo is disabled.
4. If your operating system supports SCTP, there might be a slight
chance the sctp code in the library works. Uncomment this line in
'sockets-config.h' to try:
//#define USE_SCTP
5. If you need IPv6 support, uncomment this line in
'sockets-config.h':
//#define ENABLE_IPV6
6. Type 'make'
7. If all builds ok, you'll find the static library file 'libSockets.a'
in the build directory.
When compiling the application, any flags used when compiling the library
also needs to be present when including the library .h files. All flags
can be retrieved using the 'Sockets-config' executable. Add something like
this in your Makefile:
CFLAGS += `Sockets-config`
CPPFLAGS += `Sockets-config`
When linking an application using the library, make sure the object and
library files are in correct order on your link command line:
First: Application object files
2nd: -lSockets
3rd: openssl libraries
Finally: Everything else, ending with -lpthread
windows
=======
Project files for various IDE's can be found here:
Project/ Visual studio 6.0
Project.net/ Visual studio .NET
DevCpp/ Dev C++
Please see steps 2-5 above for some details on configuring the library.
When linking on cygwin/mingw, add the following libraries:
-lwsock32
-lws2_32