Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
._.DS_store
build

.vscode

cmake-build-*
.idea
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
cmake_minimum_required(VERSION 3.5)
project(network_server)
project(chat_server)

set(CMAKE_CXX_STANDARD 17)

set(NETWORK_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp" EXCLUDE_FROM_ALL)

add_executable(network_server main.cc)
include_directories(${NETWORK_INCLUDE_DIR})

add_executable(chat_server main.cc)
target_link_libraries(chat_server PUBLIC jsoncpp pthread)

if (UNIX AND NOT APPLE)
target_compile_options(chat_server PRIVATE -fopenmp)
endif()

enable_testing()
add_subdirectory(${NETWORK_INCLUDE_DIR}/server/network)
add_subdirectory(${NETWORK_INCLUDE_DIR}/server/protocol)
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ cmake --build build

# Run
```
./build/network_server
./build/chat_server [port] [webserver_port] [ip_address]
```

# Run test
```
cd build
ctest . --extra_verbose --output_on_failure
```
or
`gcc server.c -D_REENTRANT -o server -lpthread`
Binary file removed chat_server
Binary file not shown.
102 changes: 0 additions & 102 deletions chat_server.c

This file was deleted.

4 changes: 0 additions & 4 deletions cinclude/server/network/http.h

This file was deleted.

Binary file removed cinclude/server/network/pptest
Binary file not shown.
Binary file removed cinclude/server/network/pptest2
Binary file not shown.
60 changes: 0 additions & 60 deletions cinclude/server/network/request_msg_test.cc

This file was deleted.

57 changes: 0 additions & 57 deletions cinclude/server/network/socketh_test.c

This file was deleted.

Binary file removed cinclude/server/network/test
Binary file not shown.
Binary file removed cinclude/server/network/test_for_aws
Binary file not shown.
98 changes: 0 additions & 98 deletions include/server/network/http_protocol.h

This file was deleted.

Loading