@@ -291,68 +291,6 @@ cdef class UVStream(UVHandle):
291
291
id (self ))
292
292
293
293
294
- @cython.no_gc_clear
295
- cdef class UVStreamServer(UVStream):
296
-
297
- cdef _init(self , Loop loop, object protocol_factory, Server server,
298
- object ssl):
299
-
300
- if ssl is not None and not isinstance (ssl, ssl_SSLContext):
301
- raise TypeError (
302
- ' ssl is expected to be None or an instance of '
303
- ' ssl.SSLContext, got {!r}' .format(ssl))
304
- self .ssl = ssl
305
-
306
- self ._start_init(loop)
307
- self .protocol_factory = protocol_factory
308
- self ._server = server
309
- self .opened = 0
310
-
311
- cdef listen(self , int backlog = 100 ):
312
- if self .protocol_factory is None :
313
- raise RuntimeError (' unable to listen(); no protocol_factory' )
314
-
315
- if self .opened != 1 :
316
- raise RuntimeError (' unopened UVTCPServer' )
317
-
318
- self ._listen(backlog)
319
-
320
- cdef _on_listen(self ):
321
- # Implementation for UVStream._on_listen
322
-
323
- protocol = self .protocol_factory()
324
-
325
- if self .ssl is None :
326
- client = self ._make_new_transport(protocol, None )
327
-
328
- else :
329
- waiter = aio_Future(loop = self ._loop)
330
-
331
- ssl_protocol = aio_SSLProtocol(
332
- self ._loop, protocol, self .ssl,
333
- waiter,
334
- True , # server_side
335
- None ) # server_hostname
336
-
337
- client = self ._make_new_transport(ssl_protocol, None )
338
-
339
- waiter.add_done_callback(
340
- ft_partial(self .__on_ssl_connected, client))
341
-
342
- client._accept(< UVStream> self )
343
-
344
- cdef inline _mark_as_open(self ):
345
- self .opened = 1
346
-
347
- cdef UVTransport _make_new_transport(self , object protocol, object waiter):
348
- raise NotImplementedError
349
-
350
- def __on_ssl_connected (self , transport , fut ):
351
- exc = fut.exception()
352
- if exc is not None :
353
- transport._force_close(exc)
354
-
355
-
356
294
cdef void __uv_stream_on_shutdown(uv.uv_shutdown_t* req,
357
295
int status) with gil:
358
296
0 commit comments