peerapi/src/common.h

35 lines
562 B
C
Raw Normal View History

2016-09-05 23:42:38 -07:00
/*
2017-10-24 06:30:30 -07:00
* Copyright 2016 The PeerApi Project Authors. All rights reserved.
2016-09-05 23:42:38 -07:00
*
* Ryan Lee
*/
2017-10-24 06:30:30 -07:00
#ifndef __PEERAPI_COMMON_H__
#define __PEERAPI_COMMON_H__
2016-09-05 23:42:38 -07:00
2017-10-24 06:30:30 -07:00
namespace peerapi {
2016-09-05 23:42:38 -07:00
2017-10-24 06:30:30 -07:00
#define function_peer [&]
2016-09-05 23:42:38 -07:00
enum CloseCode {
// Success
CLOSE_NORMAL = 0,
// Failure
2016-09-20 17:52:28 -07:00
CLOSE_GOING_AWAY = 0x80000000,
2016-09-05 23:42:38 -07:00
CLOSE_ABNORMAL,
CLOSE_PROTOCOL_ERROR,
CLOSE_SIGNAL_ERROR
};
2016-09-20 17:04:20 -07:00
const bool SYNC_OFF = false;
const bool SYNC_ON = true;
2016-09-05 23:42:38 -07:00
const bool FORCE_QUEUING_OFF = false;
const bool FORCE_QUEUING_ON = true;
2017-10-24 06:30:30 -07:00
} // namespace peerapi
2016-09-05 23:42:38 -07:00
2017-10-24 06:30:30 -07:00
#endif // __PEERAPI_COMMON_H__