Skip to content

Commit 477033f

Browse files
committed
Fix typo
1 parent 09a8a3c commit 477033f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

evpp/sys_sockets.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ typedef int ssize_t;
125125
/* True iff e is an error that means a read/write operation can be retried. */
126126
#define EVUTIL_ERR_RW_RETRIABLE(e) \
127127
((e) == EINTR || (e) == EAGAIN)
128-
/* True iff e is an error that means an connect can be retried. */
128+
/* True iff e is an error that means a connect can be retried. */
129129
#define EVUTIL_ERR_CONNECT_RETRIABLE(e) \
130130
((e) == EINTR || (e) == EINPROGRESS)
131-
/* True iff e is an error that means a accept can be retried. */
131+
/* True iff e is an error that means an accept can be retried. */
132132
#define EVUTIL_ERR_ACCEPT_RETRIABLE(e) \
133133
((e) == EINTR || (e) == EAGAIN || (e) == ECONNABORTED)
134134

evpp/tcp_server.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Listener;
2323
// 5. Process TCP client connections and messages in callbacks
2424
// 6. At last call Server::Stop() to stop the whole server
2525
//
26-
// The examples code is as bellow:
26+
// The example code is as bellow:
2727
// <code>
2828
// std::string addr = "0.0.0.0:9099";
2929
// int thread_num = 4;
@@ -62,13 +62,13 @@ class EVPP_EXPORT TCPServer : public ThreadDispatchPolicy, public ServerStatus {
6262
~TCPServer();
6363

6464
// @brief Do the initialization works here.
65-
// It will create a nonblocking TCP socket, and bind with the give address
65+
// It will create a nonblocking TCP socket, and bind with the given address
6666
// then listen on it. If there is anything wrong it will return false.
67-
// @return bool - True if anything goes well
67+
// @return bool - True if everything goes well
6868
bool Init();
6969

7070
// @brief Start the TCP server and we can accept new connections now.
71-
// @return bool - True if anything goes well
71+
// @return bool - True if everything goes well
7272
bool Start();
7373

7474
// @brief Stop the TCP server
@@ -80,7 +80,7 @@ class EVPP_EXPORT TCPServer : public ThreadDispatchPolicy, public ServerStatus {
8080
void AfterFork();
8181

8282
public:
83-
// Set a connection event relative callback when the TCPServer
83+
// Set a connection event relative callback which will be invoked when the TCPServer
8484
// receives a new connection or an exist connection breaks down.
8585
// When these two events happened, the value of the parameter in the callback is:
8686
// 1. Received a new connection : TCPConn::IsConnected() == true
@@ -115,7 +115,7 @@ class EVPP_EXPORT TCPServer : public ThreadDispatchPolicy, public ServerStatus {
115115

116116
DoneCallback stopped_cb_;
117117

118-
// always in the listening loop thread
118+
// These two member variables will always be modified in the listening loop thread
119119
uint64_t next_conn_id_ = 0;
120120
typedef std::map<uint64_t/*the id of the connection*/, TCPConnPtr> ConnectionMap;
121121
ConnectionMap connections_;

0 commit comments

Comments
 (0)