8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.13\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
- "POT-Creation-Date : 2025-06-27 07:36 +0000\n "
11
+ "POT-Creation-Date : 2025-08-19 00:16 +0000\n "
12
12
"PO-Revision-Date : 2022-10-31 16:28+0800\n "
13
13
"
Last-Translator :
Matt Wang <[email protected] >\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -42,7 +42,7 @@ msgstr ""
42
42
msgid "Here is an example of a TCP echo client written using asyncio streams::"
43
43
msgstr "這是一個使用 asyncio 串流編寫的 TCP echo 用戶端範例: ::"
44
44
45
- #: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:437
45
+ #: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:440
46
46
msgid ""
47
47
"import asyncio\n"
48
48
"\n"
@@ -146,7 +146,7 @@ msgstr "移除 *loop* 參數。"
146
146
147
147
#: ../../library/asyncio-stream.rst:87 ../../library/asyncio-stream.rst:131
148
148
#: ../../library/asyncio-stream.rst:167 ../../library/asyncio-stream.rst:202
149
- #: ../../library/asyncio-stream.rst:404
149
+ #: ../../library/asyncio-stream.rst:407
150
150
msgid "Added the *ssl_shutdown_timeout* parameter."
151
151
msgstr "新增 *ssl_shutdown_timeout* 參數。"
152
152
@@ -409,7 +409,7 @@ msgstr ""
409
409
"此方法會嘗試立即將 *data* 寫入到底層的 socket。如果失敗,資料會被放到內部寫入"
410
410
"緩衝中排隊等待 (queue),直到它可被發送。"
411
411
412
- #: ../../library/asyncio-stream.rst:319 ../../library/asyncio-stream.rst:331
412
+ #: ../../library/asyncio-stream.rst:319 ../../library/asyncio-stream.rst:334
413
413
msgid "The method should be used along with the ``drain()`` method::"
414
414
msgstr "此方法應當與 ``drain()`` 方法一起使用: ::"
415
415
@@ -421,7 +421,13 @@ msgstr ""
421
421
"stream.write(data)\n"
422
422
"await stream.drain()"
423
423
424
- #: ../../library/asyncio-stream.rst:326
424
+ #: ../../library/asyncio-stream.rst:325
425
+ msgid ""
426
+ "The *data* buffer should be a C contiguous one-dimensional :term:`bytes-like "
427
+ "object <bytes-like object>`."
428
+ msgstr ""
429
+
430
+ #: ../../library/asyncio-stream.rst:329
425
431
msgid ""
426
432
"The method writes a list (or any iterable) of bytes to the underlying socket "
427
433
"immediately. If that fails, the data is queued in an internal write buffer "
@@ -430,68 +436,68 @@ msgstr ""
430
436
"此方法會立即嘗試將一個位元組 list(或任何可疊代物件 (iterable))寫入到底層的 "
431
437
"socket。如果失敗,資料會被放到內部寫入緩衝中排隊等待,直到它可被發送。"
432
438
433
- #: ../../library/asyncio-stream.rst:333
439
+ #: ../../library/asyncio-stream.rst:336
434
440
msgid ""
435
441
"stream.writelines(lines)\n"
436
442
"await stream.drain()"
437
443
msgstr ""
438
444
"stream.writelines(lines)\n"
439
445
"await stream.drain()"
440
446
441
- #: ../../library/asyncio-stream.rst:338
447
+ #: ../../library/asyncio-stream.rst:341
442
448
msgid "The method closes the stream and the underlying socket."
443
449
msgstr "此方法會關閉串流以及底層的 socket。"
444
450
445
- #: ../../library/asyncio-stream.rst:340
451
+ #: ../../library/asyncio-stream.rst:343
446
452
msgid ""
447
453
"The method should be used, though not mandatory, along with the "
448
454
"``wait_closed()`` method::"
449
455
msgstr "此方法應與 ``wait_closed()`` 方法一起使用,但並非強制: ::"
450
456
451
- #: ../../library/asyncio-stream.rst:343
457
+ #: ../../library/asyncio-stream.rst:346
452
458
msgid ""
453
459
"stream.close()\n"
454
460
"await stream.wait_closed()"
455
461
msgstr ""
456
462
"stream.close()\n"
457
463
"await stream.wait_closed()"
458
464
459
- #: ../../library/asyncio-stream.rst:348
465
+ #: ../../library/asyncio-stream.rst:351
460
466
msgid ""
461
467
"Return ``True`` if the underlying transport supports the :meth:`write_eof` "
462
468
"method, ``False`` otherwise."
463
469
msgstr ""
464
470
"如果底層的傳輸支援 :meth:`write_eof` 方法就回傳 ``True``,否則回傳 "
465
471
"``False``。"
466
472
467
- #: ../../library/asyncio-stream.rst:353
473
+ #: ../../library/asyncio-stream.rst:356
468
474
msgid ""
469
475
"Close the write end of the stream after the buffered write data is flushed."
470
476
msgstr "在已緩衝的寫入資料被清理 (flush) 後關閉串流的寫入端。"
471
477
472
- #: ../../library/asyncio-stream.rst:358
478
+ #: ../../library/asyncio-stream.rst:361
473
479
msgid "Return the underlying asyncio transport."
474
480
msgstr "回傳底層的 asyncio 傳輸。"
475
481
476
- #: ../../library/asyncio-stream.rst:362
482
+ #: ../../library/asyncio-stream.rst:365
477
483
msgid ""
478
484
"Access optional transport information; see :meth:`BaseTransport."
479
485
"get_extra_info` for details."
480
486
msgstr "存取可選的傳輸資訊;詳情請見 :meth:`BaseTransport.get_extra_info`。"
481
487
482
- #: ../../library/asyncio-stream.rst:368
488
+ #: ../../library/asyncio-stream.rst:371
483
489
msgid "Wait until it is appropriate to resume writing to the stream. Example::"
484
490
msgstr "等待直到可以繼續寫入到串流。範例: ::"
485
491
486
- #: ../../library/asyncio-stream.rst:371
492
+ #: ../../library/asyncio-stream.rst:374
487
493
msgid ""
488
494
"writer.write(data)\n"
489
495
"await writer.drain()"
490
496
msgstr ""
491
497
"writer.write(data)\n"
492
498
"await writer.drain()"
493
499
494
- #: ../../library/asyncio-stream.rst:374
500
+ #: ../../library/asyncio-stream.rst:377
495
501
msgid ""
496
502
"This is a flow control method that interacts with the underlying IO write "
497
503
"buffer. When the size of the buffer reaches the high watermark, *drain()* "
@@ -503,48 +509,48 @@ msgstr ""
503
509
"(high watermark) 時,*drain()* 會阻塞直到緩衝區大小減少至最低標記位 (low "
504
510
"watermark) 以便繼續寫入。當沒有要等待的資料時,:meth:`drain` 會立即回傳。"
505
511
506
- #: ../../library/asyncio-stream.rst:385
512
+ #: ../../library/asyncio-stream.rst:388
507
513
msgid "Upgrade an existing stream-based connection to TLS."
508
514
msgstr "將現有的基於串流的連線升級到 TLS。"
509
515
510
- #: ../../library/asyncio-stream.rst:387
516
+ #: ../../library/asyncio-stream.rst:390
511
517
msgid "Parameters:"
512
518
msgstr "參數:"
513
519
514
- #: ../../library/asyncio-stream.rst:389
520
+ #: ../../library/asyncio-stream.rst:392
515
521
msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`."
516
522
msgstr "*sslcontext*:一個 :class:`~ssl.SSLContext` 的已配置實例。"
517
523
518
- #: ../../library/asyncio-stream.rst:391
524
+ #: ../../library/asyncio-stream.rst:394
519
525
msgid ""
520
526
"*server_hostname*: sets or overrides the host name that the target server's "
521
527
"certificate will be matched against."
522
528
msgstr "*server_hostname*:設定或覆寫將會被目標伺服器憑證比對的主機名稱。"
523
529
524
- #: ../../library/asyncio-stream.rst:394
530
+ #: ../../library/asyncio-stream.rst:397
525
531
msgid ""
526
532
"*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake "
527
533
"to complete before aborting the connection. ``60.0`` seconds if ``None`` "
528
534
"(default)."
529
535
msgstr ""
530
536
531
- #: ../../library/asyncio-stream.rst:398
537
+ #: ../../library/asyncio-stream.rst:401
532
538
msgid ""
533
539
"*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown "
534
540
"to complete before aborting the connection. ``30.0`` seconds if ``None`` "
535
541
"(default)."
536
542
msgstr ""
537
543
538
- #: ../../library/asyncio-stream.rst:410
544
+ #: ../../library/asyncio-stream.rst:413
539
545
msgid ""
540
546
"Return ``True`` if the stream is closed or in the process of being closed."
541
547
msgstr "如果串流已被關閉或正在被關閉則回傳 ``True``。"
542
548
543
- #: ../../library/asyncio-stream.rst:418
549
+ #: ../../library/asyncio-stream.rst:421
544
550
msgid "Wait until the stream is closed."
545
551
msgstr "等待直到串流被關閉。"
546
552
547
- #: ../../library/asyncio-stream.rst:420
553
+ #: ../../library/asyncio-stream.rst:423
548
554
msgid ""
549
555
"Should be called after :meth:`close` to wait until the underlying connection "
550
556
"is closed, ensuring that all data has been flushed before e.g. exiting the "
@@ -553,19 +559,19 @@ msgstr ""
553
559
"應當在 :meth:`close` 之後才被呼叫,這會持續等待直到底層的連線被關閉,以確保在"
554
560
"這之前(例如在程式退出前)所有資料都已經被清空"
555
561
556
- #: ../../library/asyncio-stream.rst:428
562
+ #: ../../library/asyncio-stream.rst:431
557
563
msgid "Examples"
558
564
msgstr "範例"
559
565
560
- #: ../../library/asyncio-stream.rst:433
566
+ #: ../../library/asyncio-stream.rst:436
561
567
msgid "TCP echo client using streams"
562
568
msgstr "使用串流的 TCP echo 用戶端"
563
569
564
- #: ../../library/asyncio-stream.rst:435
570
+ #: ../../library/asyncio-stream.rst:438
565
571
msgid "TCP echo client using the :func:`asyncio.open_connection` function::"
566
572
msgstr "使用 :func:`asyncio.open_connection` 函式的 TCP echo 用戶端: ::"
567
573
568
- #: ../../library/asyncio-stream.rst:459
574
+ #: ../../library/asyncio-stream.rst:462
569
575
msgid ""
570
576
"The :ref:`TCP echo client protocol "
571
577
"<asyncio_example_tcp_echo_client_protocol>` example uses the low-level :meth:"
@@ -574,15 +580,15 @@ msgstr ""
574
580
"使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 用戶端協定 "
575
581
"<asyncio_example_tcp_echo_client_protocol>`\\ 範例。"
576
582
577
- #: ../../library/asyncio-stream.rst:466
583
+ #: ../../library/asyncio-stream.rst:469
578
584
msgid "TCP echo server using streams"
579
585
msgstr "使用串流的 TCP echo 伺服器"
580
586
581
- #: ../../library/asyncio-stream.rst:468
587
+ #: ../../library/asyncio-stream.rst:471
582
588
msgid "TCP echo server using the :func:`asyncio.start_server` function::"
583
589
msgstr "TCP echo 伺服器使用 :func:`asyncio.start_server` 函式: ::"
584
590
585
- #: ../../library/asyncio-stream.rst:470
591
+ #: ../../library/asyncio-stream.rst:473
586
592
msgid ""
587
593
"import asyncio\n"
588
594
"\n"
@@ -642,7 +648,7 @@ msgstr ""
642
648
"\n"
643
649
"asyncio.run(main())"
644
650
645
- #: ../../library/asyncio-stream.rst:502
651
+ #: ../../library/asyncio-stream.rst:505
646
652
msgid ""
647
653
"The :ref:`TCP echo server protocol "
648
654
"<asyncio_example_tcp_echo_server_protocol>` example uses the :meth:`loop."
@@ -651,16 +657,16 @@ msgstr ""
651
657
"使用 :meth:`loop.create_server` 方法的 :ref:`TCP echo 伺服器協定 "
652
658
"<asyncio_example_tcp_echo_server_protocol>` 範例。"
653
659
654
- #: ../../library/asyncio-stream.rst:507
660
+ #: ../../library/asyncio-stream.rst:510
655
661
msgid "Get HTTP headers"
656
662
msgstr "取得 HTTP 標頭"
657
663
658
- #: ../../library/asyncio-stream.rst:509
664
+ #: ../../library/asyncio-stream.rst:512
659
665
msgid ""
660
666
"Simple example querying HTTP headers of the URL passed on the command line::"
661
667
msgstr "查詢自命令列傳入之 URL 所帶有 HTTP 標頭的簡單範例: ::"
662
668
663
- #: ../../library/asyncio-stream.rst:511
669
+ #: ../../library/asyncio-stream.rst:514
664
670
msgid ""
665
671
"import asyncio\n"
666
672
"import urllib.parse\n"
@@ -699,34 +705,34 @@ msgid ""
699
705
"asyncio.run(print_http_headers(url))"
700
706
msgstr ""
701
707
702
- #: ../../library/asyncio-stream.rst:548
708
+ #: ../../library/asyncio-stream.rst:551
703
709
msgid "Usage::"
704
710
msgstr "用法: ::"
705
711
706
- #: ../../library/asyncio-stream.rst:550
712
+ #: ../../library/asyncio-stream.rst:553
707
713
msgid "python example.py http://example.com/path/page.html"
708
714
msgstr "python example.py http://example.com/path/page.html"
709
715
710
- #: ../../library/asyncio-stream.rst:552
716
+ #: ../../library/asyncio-stream.rst:555
711
717
msgid "or with HTTPS::"
712
718
msgstr "或使用 HTTPS: ::"
713
719
714
- #: ../../library/asyncio-stream.rst:554
720
+ #: ../../library/asyncio-stream.rst:557
715
721
msgid "python example.py https://example.com/path/page.html"
716
722
msgstr "python example.py https://example.com/path/page.html"
717
723
718
- #: ../../library/asyncio-stream.rst:560
724
+ #: ../../library/asyncio-stream.rst:563
719
725
msgid "Register an open socket to wait for data using streams"
720
726
msgstr "註冊一個使用串流來等待資料的開放 socket"
721
727
722
- #: ../../library/asyncio-stream.rst:562
728
+ #: ../../library/asyncio-stream.rst:565
723
729
msgid ""
724
730
"Coroutine waiting until a socket receives data using the :func:"
725
731
"`open_connection` function::"
726
732
msgstr ""
727
733
"等待直到 socket 透過使用 :func:`open_connection` 函式接收到資料的協程: ::"
728
734
729
- #: ../../library/asyncio-stream.rst:565
735
+ #: ../../library/asyncio-stream.rst:568
730
736
msgid ""
731
737
"import asyncio\n"
732
738
"import socket\n"
@@ -759,7 +765,7 @@ msgid ""
759
765
"asyncio.run(wait_for_data())"
760
766
msgstr ""
761
767
762
- #: ../../library/asyncio-stream.rst:597
768
+ #: ../../library/asyncio-stream.rst:600
763
769
msgid ""
764
770
"The :ref:`register an open socket to wait for data using a protocol "
765
771
"<asyncio_example_create_connection>` example uses a low-level protocol and "
@@ -769,7 +775,7 @@ msgstr ""
769
775
"<asyncio_example_create_connection>`\\ 範例中,有使用了低階協定以及 :meth:"
770
776
"`loop.create_connection` 方法。"
771
777
772
- #: ../../library/asyncio-stream.rst:601
778
+ #: ../../library/asyncio-stream.rst:604
773
779
msgid ""
774
780
"The :ref:`watch a file descriptor for read events "
775
781
"<asyncio_example_watch_fd>` example uses the low-level :meth:`loop."
0 commit comments