oceanbase
1/**
2* Copyright (c) 2021 OceanBase
3* OceanBase CE is licensed under Mulan PubL v2.
4* You can use this software according to the terms and conditions of the Mulan PubL v2.
5* You may obtain a copy of Mulan PubL v2 at:
6* http://license.coscl.org.cn/MulanPubL-2.0
7* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10* See the Mulan PubL v2 for more details.
11*/
12
13extern inline void ussl_skset(ussl_sock_t *s, uint32_t m);14extern inline void ussl_skclear(ussl_sock_t *s, uint32_t m);15extern inline int ussl_sktest(ussl_sock_t *s, uint32_t m);16
17void ussl_sf_init(ussl_sf_t *sf, void *create, void *destroy)18{
19sf->create = (typeof(sf->create))create;20sf->destroy = (typeof(sf->destroy))destroy;21}
22
23void ussl_sk_init(ussl_sock_t *s, ussl_sf_t *sf, void *handle_event, int fd)24{
25s->fty = sf;26s->handle_event = (typeof(s->handle_event))handle_event;27s->fd = fd;28}
29