summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJellyBrick <shlee1503@naver.com>2018-06-02 03:14:53 +0900
committerJellyBrick <shlee1503@naver.com>2018-06-02 03:14:53 +0900
commit24071e4aa02a2720c0047e877b8c6faf2a4c05d5 (patch)
tree83b5bc5fb77be49ed4abf0f827c3b6f83f03daac /README.md
parentfa662a813bc36db87a83e2eae02f598f4342240f (diff)
Add optimization option
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index b114fbe..50d7305 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,22 @@ sudo make install
g++ telegram_bot.cpp -o telegram_bot --std=c++11 -I/usr/local/include -lTgBot -lboost_system -lssl -lcrypto -lpthread
```
+### Bot compile define
+
+#### With CMake
+```
+add_definitions(-DTGBOT_DISABLE_NAGLES_ALGORITHM) # Disable 'Nagle's algorithm'
+add_definitions(-DTGBOT_CHANGE_SOCKET_BUFFER_SIZE) # Socket Buffer Size Expansion
+add_definitions(-DTGBOT_CHANGE_READ_BUFFER_SIZE) # Read Buffer Size Expansion
+```
+
+### Without CMake
+```
+-DTGBOT_DISABLE_NAGLES_ALGORITHM
+-DTGBOT_CHANGE_SOCKET_BUFFER_SIZE
+-DTGBOT_CHANGE_READ_BUFFER_SIZE
+```
+
### Also
You can use Docker to build and run your bot. Set the base image of your's Dockerfile to [reo7sp/tgbot-cpp](https://hub.docker.com/r/reo7sp/tgbot-cpp/).