Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
zieckey committed Nov 6, 2022
1 parent 09a8a3c commit 477033f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions evpp/sys_sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ typedef int ssize_t;
/* True iff e is an error that means a read/write operation can be retried. */
#define EVUTIL_ERR_RW_RETRIABLE(e) \
((e) == EINTR || (e) == EAGAIN)
/* True iff e is an error that means an connect can be retried. */
/* True iff e is an error that means a connect can be retried. */
#define EVUTIL_ERR_CONNECT_RETRIABLE(e) \
((e) == EINTR || (e) == EINPROGRESS)
/* True iff e is an error that means a accept can be retried. */
/* True iff e is an error that means an accept can be retried. */
#define EVUTIL_ERR_ACCEPT_RETRIABLE(e) \
((e) == EINTR || (e) == EAGAIN || (e) == ECONNABORTED)

Expand Down
12 changes: 6 additions & 6 deletions evpp/tcp_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Listener;
// 5. Process TCP client connections and messages in callbacks
// 6. At last call Server::Stop() to stop the whole server
//
// The examples code is as bellow:
// The example code is as bellow:
// <code>
// std::string addr = "0.0.0.0:9099";
// int thread_num = 4;
Expand Down Expand Up @@ -62,13 +62,13 @@ class EVPP_EXPORT TCPServer : public ThreadDispatchPolicy, public ServerStatus {
~TCPServer();

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

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

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

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

DoneCallback stopped_cb_;

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

0 comments on commit 477033f

Please sign in to comment.