socket read with timeout, logging

This commit is contained in:
Nam Tran
2020-11-04 20:25:50 -06:00
commit 5cf14e3652
3 changed files with 160 additions and 0 deletions

22
Makefile Normal file
View File

@@ -0,0 +1,22 @@
target = r
CXX = g++
CXX_FLAGS := -std=c++14 -Iloguru
LD_FLAGS := -lpthread -ldl
BUILD := ./build
OBJS := $(BUILD)/client.o $(BUILD)/loguru.o
all: $(target)
$(BUILD)/%.o: %.cc
@mkdir -p $(BUILD)
g++ -c $< -o $@ $(CXX_FLAGS)
$(BUILD)/loguru.o:
@mkdir -p $(BUILD)
g++ -c loguru/loguru.cpp -Iloguru -o $@ $(CXX_FLAGS)
r: $(OBJS)
g++ -o $@ $^ $(LD_FLAGS)
clean:
rm -rf $(BUILD) r