SSL_get_all_async_fds(3) - wariua/manpages-ko GitHub Wiki

NAME

SSL_waiting_for_async, SSL_get_all_async_fds, SSL_get_changed_async_fds - 비동기 λ™μž‘ κ΄€λ¦¬ν•˜κΈ°

SYNOPSIS

#include <openssl/async.h>
#include <openssl/ssl.h>

int SSL_waiting_for_async(SSL *s);
int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fd, size_t *numfds);
int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds,
                              OSSL_ASYNC_FD *delfd, size_t *numdelfds);

DESCRIPTION

SSL_waiting_for_async()λŠ” SSL 연결이 ν˜„μž¬ 비동기 λ™μž‘μ΄ μ™„λ£Œλ˜κΈ°λ₯Ό 기닀리고 μžˆλŠ”μ§€ μ•Œμ•„λ‚Έλ‹€. (SSL_CTX_set_mode(3)의 SSL_MODE_ASYNC λͺ¨λ“œ μ°Έκ³ .)

SSL_get_all_async_fds()λŠ” ν˜„μž¬ 비동기 λ™μž‘μ΄ μ™„λ£Œλ˜μ—ˆλŠ”μ§€ μ—¬λΆ€λ₯Ό μ•Œμ•„λ‚΄κΈ° μœ„ν•΄ select() λ‚΄μ§€ poll() ν˜ΈμΆœμ— μ“Έ 수 μžˆλŠ” 파일 λ””μŠ€ν¬λ¦½ν„°μ˜ λͺ©λ‘μ„ λ°˜ν™˜ν•œλ‹€. λ™μž‘μ΄ μ™„λ£Œλ˜λ©΄ 파일 λ””μŠ€ν¬λ¦½ν„°μ— 데이터가 "읽기 μ€€λΉ„"인 κ²ƒμœΌλ‘œ λ‚˜νƒ€λ‚˜κ²Œ λœλ‹€. (κ·Έ 파일 λ””μŠ€ν¬λ¦½ν„°μ—μ„œ μ‹€μ œ 데이터λ₯Ό 읽어듀여선 μ•ˆ λœλ‹€.) 이 ν•¨μˆ˜λŠ” SSL 객체가 ν˜„μž¬ 비동기 μž‘μ—… μ™„λ£Œλ₯Ό 기닀리고 μžˆλŠ” κ²½μš°μ—λ§Œ (즉 SSL_ERROR_WANT_ASYNCλ₯Ό λ°›μ•˜μ„ λ•Œλ§Œ - SSL_get_error(3) μ°Έκ³ ) ν˜ΈμΆœν•΄μ•Ό ν•œλ‹€. 보톡 κ·Έ λͺ©λ‘μ—λŠ” 파일 λ””μŠ€ν¬λ¦½ν„° ν•œ 개만 μžˆμ„ 것이닀. ν•˜μ§€λ§Œ 비동기 지원 엔진을 μ—¬λŸ¬ 개 μ‚¬μš© 쀑이라면 μ—¬λŸ¬ κ°œκ°€ μžˆμ„ μˆ˜λ„ μžˆλ‹€. λ°˜ν™˜ν•˜λŠ” 파일 λ””μŠ€ν¬λ¦½ν„° 수λ₯Ό *numfds에 μ €μž₯ν•˜κ³  파일 λ””μŠ€ν¬λ¦½ν„°λ“€μ„ *fds에 μ €μž₯ν•œλ‹€. fds λ§€κ°œλ³€μˆ˜λŠ” NULL일 μˆ˜λ„ 있고, κ·Έ 경우 μ–΄λ–€ 파일 λ””μŠ€ν¬λ¦½ν„°λ„ λ°˜ν™˜ν•˜μ§€ μ•Šμ§€λ§Œ *numfdsλŠ” μ±„μš΄λ‹€. *fds에 μΆ©λΆ„ν•œ λ©”λͺ¨λ¦¬λ₯Ό ν• λ‹Ήν•˜λŠ” 것이 호좜자의 μ±…μž„μ΄λ―€λ‘œ 보톡은 이 ν•¨μˆ˜λ₯Ό 두 번 (ν•œ λ²ˆμ€ fds λ§€κ°œλ³€μˆ˜λ₯Ό NULL둜, 또 ν•œ λ²ˆμ€ μ•„λ‹ˆκ²Œ) ν˜ΈμΆœν•œλ‹€.

SSL_get_changed_async_fds()λŠ” λ§ˆμ§€λ§‰μœΌλ‘œ SSL_ERROR_WANT_ASYNCλ₯Ό 받은 이후 (λ˜λŠ” SSL_ERROR_WANT_ASYNCλ₯Ό 받은 적이 μ—†λ‹€λ©΄ SSL 객체λ₯Ό μƒμ„±ν•œ 이후) λͺ©λ‘μ— μΆ”κ°€λ˜μ—ˆκ±°λ‚˜ λͺ©λ‘μ—μ„œ μ‚­μ œλœ 비동기 파일 λ””μŠ€ν¬λ¦½ν„°λ“€μ˜ λͺ©λ‘μ„ λ°˜ν™˜ν•œλ‹€. SSL_get_all_async_fds()처럼 *addfd와 *delfd에 μΆ©λΆ„ν•œ λ©”λͺ¨λ¦¬λ₯Ό ν• λ‹Ήν•˜λŠ” 것이 호좜자의 μ±…μž„μ΄λ©° NULL일 μˆ˜λ„ μžˆλ‹€. μΆ”κ°€λœ fd κ°œμˆ˜μ™€ μ‚­μ œλœ fd 개수λ₯Ό 각각 *numaddfds와 *numdelfds에 μ €μž₯ν•œλ‹€.

RETURN VALUES

SSL_waiting_for_async()λŠ” ν˜„μž¬ SSL λ™μž‘μ΄ 비동기 λ™μž‘ μ™„λ£Œλ₯Ό 기닀리고 있으면 1을 λ°˜ν™˜ν•˜κ³  μ•„λ‹ˆλ©΄ 0을 λ°˜ν™˜ν•œλ‹€.

SSL_get_all_async_fds()와 SSL_get_changed_async_fds()λŠ” 성곡 μ‹œ 1을 λ°˜ν™˜ν•˜κ³  였λ₯˜ μ‹œ 0을 λ°˜ν™˜ν•œλ‹€.

NOTES

μœˆλ„μš° ν”Œλž«νΌμ—μ„œλŠ” openssl/async.h 헀더에 ν•„μš”ν•œ λͺ‡ κ°€μ§€ νƒ€μž…λ“€μ΄ 보톡 windows.hλ₯Ό ν¬ν•¨μ‹œμΌœμ•Ό μ‚¬μš© κ°€λŠ₯ν•΄μ§„λ‹€. 그런데 κ°€μž₯ λ¨Όμ € ν¬ν•¨μ‹œν‚€λŠ” 헀더듀 쀑 ν•˜λ‚˜μΈ windows.hλ₯Ό μ–Έμ œ ν¬ν•¨μ‹œν‚¬μ§€λ₯Ό μ‘μš© κ°œλ°œμžκ°€ ν†΅μ œν•  수 μžˆμ–΄μ•Ό ν•˜λŠ” κ²½μš°κ°€ λ§Žλ‹€. λ”°λΌμ„œ async.h에 μ•žμ„œ windows.hλ₯Ό ν¬ν•¨μ‹œν‚€λŠ” 것을 μ‘μš© 개발자의 μ±…μž„μœΌλ‘œ κ·œμ •ν•œλ‹€.

SEE ALSO

SSL_get_error(3), SSL_CTX_set_mode(3)

HISTORY

OpenSSL 1.1.0μ—μ„œ SSL_waiting_for_async(), SSL_get_all_async_fds(), SSL_get_changed_async_fds()κ°€ 처음 μΆ”κ°€λ˜μ—ˆλ‹€.

COPYRIGHT

Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.


2017-12-31

⚠️ **GitHub.com Fallback** ⚠️