Fork of the ENet library.
What's different from the original ENet:
- All code is contained in two files:
enet.h
andenet.c
for easy integration in your project. - All system includes have been moved into the
.c
. This is to avoid cluttering the global namespace. For example, the original ENet includes windows headers that definemin
andmax
, which can cause conflicts with user's functions. - There is a small
CMakeLists.txt
in case your project uses CMake (but it's entirely optional). - Added
enet_get_lan_broadcast_ip_addresses
function. It helps you find out the IP addresses you can use to broadcast messages in the LAN.
- Copy
enet.h
andenet.c
to some folder in your project. - Add
enet.c
to the list of compiled files.
- Make an
enet/
subfolder in your project. - Copy
enet.h
,enet.c
andCMakeLists.txt
insideenet/
. - Inside the CMakeLists.txt of your project, add
add_subdirectory(enet)
andtarget_link_libraries(<my_project> <other_libs> enet)
.