Skip to content

Instantly share code, notes, and snippets.

View liuqun's full-sized avatar

刘群 liuqun

  • Tianbo Electronic Information Technology Co., Ltd.
  • 山东青岛(Tsingtao, China)
View GitHub Profile
@reterVision
reterVision / maxmin.c
Created March 27, 2013 00:37
__typeof__ example in GCC
#include <stdio.h>
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define min(a, b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _b : _a; })
#define max(a, b) \
@Jxck
Jxck / dtls_api.md
Created May 24, 2016 08:21
OpenSSL DTLS API

OpenSSL DTLS API

The API used for DTLS is mostly the same as for TLS, because of the mapping of generic functions to protocol specifc ones. Some additional functions are still necessary, because of the new BIO objects and the timer handling for handshake messages. The generic concept of the API is described in the following sections. Examples of applications using DTLS are available at [9].

DTLS の API は TLS とほぼ同じ。 BIO オブジェクトの生成とタイマのために追加でいくつか必要。