Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
uvloop/uvloop/sslproto.pxd at master · MagicStack/uvloop · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
MagicStack
/
uvloop
Public
Notifications
You must be signed in to change notification settings
Fork
615
Star
11.9k
Code
Issues
129
Pull requests
31
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
uvloop
/
uvloop
/
sslproto.pxd
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
144 lines (110 loc) · 3.89 KB
master
Breadcrumbs
uvloop
/
uvloop
/
sslproto.pxd
Copy path
Top
File metadata and controls
Code
Blame
144 lines (110 loc) · 3.89 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
cdef
enum
SSLProtocolState:
UNWRAPPED
=
0
DO_HANDSHAKE
=
1
WRAPPED
=
2
FLUSHING
=
3
SHUTDOWN
=
4
cdef
enum
AppProtocolState:
#
This tracks the state of app protocol (https://git.io/fj59P):
#
#
INIT -cm-> CON_MADE [-dr*->] [-er-> EOF?] -cl-> CON_LOST
#
#
* cm: connection_made()
#
* dr: data_received()
#
* er: eof_received()
#
* cl: connection_lost()
STATE_INIT
=
0
STATE_CON_MADE
=
1
STATE_EOF
=
2
STATE_CON_LOST
=
3
cdef
class
_SSLProtocolTransport:
cdef:
Loop _loop
SSLProtocol _ssl_protocol
bint _closed
object
context
cdef
class
SSLProtocol:
cdef:
bint _server_side
str
_server_hostname
object
_sslcontext
object
_extra
object
_write_backlog
size_t _write_buffer_size
object
_waiter
Loop _loop
_SSLProtocolTransport _app_transport
bint _app_transport_created
object
_transport
object
_ssl_handshake_timeout
object
_ssl_shutdown_timeout
object
_sslobj
object
_sslobj_read
object
_sslobj_write
object
_sslobj_pending
object
_incoming
object
_incoming_write
object
_outgoing
object
_outgoing_read
char
*
_ssl_buffer
size_t _ssl_buffer_len
SSLProtocolState _state
size_t _conn_lost
AppProtocolState _app_state
bint _ssl_writing_paused
bint _app_reading_paused
size_t _incoming_high_water
size_t _incoming_low_water
bint _ssl_reading_paused
bint _app_writing_paused
size_t _outgoing_high_water
size_t _outgoing_low_water
object
_app_protocol
bint _app_protocol_is_buffer
object
_app_protocol_get_buffer
object
_app_protocol_buffer_updated
object
_handshake_start_time
object
_handshake_timeout_handle
object
_shutdown_timeout_handle
#
Instead of doing python calls, c methods *_impl are called directly
#
from stream.pyx
cdef inline get_buffer_impl(
self
, size_t n,
char
**
buf, size_t
*
buf_size)
cdef inline buffer_updated_impl(
self
, size_t nbytes)
cdef inline _set_app_protocol(
self
, app_protocol)
cdef inline _wakeup_waiter(
self
,
exc
=
*
)
cdef inline _get_extra_info(
self
, name,
default
=
*
)
cdef inline _set_state(
self
, SSLProtocolState new_state)
#
Handshake flow
cdef inline _start_handshake(
self
)
cdef inline _check_handshake_timeout(
self
)
cdef inline _do_handshake(
self
)
cdef inline _on_handshake_complete(
self
, handshake_exc)
#
Shutdown flow
cdef inline _start_shutdown(
self
,
object
context
=
*
)
cdef inline _check_shutdown_timeout(
self
)
cdef inline _do_read_into_void(
self
,
object
context)
cdef inline _do_flush(
self
,
object
context
=
*
)
cdef inline _do_shutdown(
self
,
object
context
=
*
)
cdef inline _on_shutdown_complete(
self
, shutdown_exc)
cdef inline _abort(
self
, exc)
#
Outgoing flow
cdef inline _write_appdata(
self
, list_of_data,
object
context)
cdef inline _do_write(
self
)
cdef inline _process_outgoing(
self
)
#
Incoming flow
cdef inline _do_read(
self
)
cdef inline _do_read__buffered(
self
)
cdef inline _do_read__copied(
self
)
cdef inline _call_eof_received(
self
,
object
context
=
*
)
#
Flow control for writes from APP socket
cdef inline _control_app_writing(
self
,
object
context
=
*
)
cdef inline size_t _get_write_buffer_size(
self
)
cdef inline _set_write_buffer_limits(
self
,
high
=
*
,
low
=
*
)
#
Flow control for reads to APP socket
cdef inline _pause_reading(
self
)
cdef inline _resume_reading(
self
,
object
context)
#
Flow control for reads from SSL socket
cdef inline _control_ssl_reading(
self
)
cdef inline _set_read_buffer_limits(
self
,
high
=
*
,
low
=
*
)
cdef inline size_t _get_read_buffer_size(
self
)
cdef inline _fatal_error(
self
, exc,
message
=
*
)
You can’t perform that action at this time.