Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
599d76b2
Kaydet (Commit)
599d76b2
authored
Kas 11, 2011
tarafından
Florent Xicluna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reformat paragraphs.
üst
45c6c3eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
socketserver.rst
Doc/library/socketserver.rst
+13
-12
No files found.
Doc/library/socketserver.rst
Dosyayı görüntüle @
599d76b2
...
@@ -39,11 +39,12 @@ process one or many requests.
...
@@ -39,11 +39,12 @@ process one or many requests.
When inheriting from :class:`ThreadingMixIn` for threaded connection behavior,
When inheriting from :class:`ThreadingMixIn` for threaded connection behavior,
you should explicitly declare how you want your threads to behave on an abrupt
you should explicitly declare how you want your threads to behave on an abrupt
shutdown. The :class:`ThreadingMixIn` class defines an attribute
shutdown.
The :class:`ThreadingMixIn` class defines an attribute
*daemon_threads*, which indicates whether or not the server should wait for
*daemon_threads*, which indicates whether or not the server should wait for
thread termination. You should set the flag explicitly if you would like threads
thread termination. You should set the flag explicitly if you would like
to behave autonomously; the default is :const:`False`, meaning that Python will
threads to behave autonomously; the default is :const:`False`, meaning that
not exit until all threads created by :class:`ThreadingMixIn` have exited.
Python will not exit until all threads created by :class:`ThreadingMixIn` have
exited.
Server classes have the same external methods and attributes, no matter what
Server classes have the same external methods and attributes, no matter what
network protocol they use.
network protocol they use.
...
@@ -115,8 +116,8 @@ or inappropriate for the service) is to maintain an explicit table of partially
...
@@ -115,8 +116,8 @@ or inappropriate for the service) is to maintain an explicit table of partially
finished requests and to use :func:`select` to decide which request to work on
finished requests and to use :func:`select` to decide which request to work on
next (or whether to handle a new incoming request). This is particularly
next (or whether to handle a new incoming request). This is particularly
important for stream services where each client can potentially be connected for
important for stream services where each client can potentially be connected for
a long time (if threads or subprocesses cannot be used).
See :mod:`asyncore` for
a long time (if threads or subprocesses cannot be used).
See :mod:`asyncore`
another way to manage this.
for
another way to manage this.
.. XXX should data and methods be intermingled, or separate?
.. XXX should data and methods be intermingled, or separate?
how should the distinction between class and instance variables be drawn?
how should the distinction between class and instance variables be drawn?
...
@@ -192,7 +193,7 @@ The server classes support the following class variables:
...
@@ -192,7 +193,7 @@ The server classes support the following class variables:
.. attribute:: BaseServer.allow_reuse_address
.. attribute:: BaseServer.allow_reuse_address
Whether the server will allow the reuse of an address. This defaults to
Whether the server will allow the reuse of an address.
This defaults to
:const:`False`, and can be set in subclasses to change the policy.
:const:`False`, and can be set in subclasses to change the policy.
...
@@ -269,7 +270,7 @@ users of the server object.
...
@@ -269,7 +270,7 @@ users of the server object.
.. method:: BaseServer.server_activate()
.. method:: BaseServer.server_activate()
Called by the server's constructor to activate the server. The default behavior
Called by the server's constructor to activate the server. The default behavior
just :meth:`listen`\ s to the server's socket. May be overridden.
just :meth:`listen`\ s to the server's socket.
May be overridden.
.. method:: BaseServer.server_bind()
.. method:: BaseServer.server_bind()
...
@@ -280,10 +281,10 @@ users of the server object.
...
@@ -280,10 +281,10 @@ users of the server object.
.. method:: BaseServer.verify_request(request, client_address)
.. method:: BaseServer.verify_request(request, client_address)
Must return a Boolean value; if the value is :const:`True`, the request will
be
Must return a Boolean value; if the value is :const:`True`, the request will
processed, and if it's :const:`False`, the request will be denied. This function
be processed, and if it's :const:`False`, the request will be denied. This
can be overridden to implement access controls for a server. The default
function can be overridden to implement access controls for a server. The
implementation always returns :const:`True`.
default
implementation always returns :const:`True`.
RequestHandler Objects
RequestHandler Objects
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment