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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="Netftp_data_endpoint.html">
<link rel="next" href="Nethttp_fs.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of extensions" rel=Appendix href="index_extensions.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Uq_gtk" rel="Chapter" href="Uq_gtk.html">
<link title="Uq_tcl" rel="Chapter" href="Uq_tcl.html">
<link title="Equeue" rel="Chapter" href="Equeue.html">
<link title="Unixqueue" rel="Chapter" href="Unixqueue.html">
<link title="Unixqueue_pollset" rel="Chapter" href="Unixqueue_pollset.html">
<link title="Unixqueue_select" rel="Chapter" href="Unixqueue_select.html">
<link title="Uq_resolver" rel="Chapter" href="Uq_resolver.html">
<link title="Uq_engines" rel="Chapter" href="Uq_engines.html">
<link title="Uq_multiplex" rel="Chapter" href="Uq_multiplex.html">
<link title="Uq_transfer" rel="Chapter" href="Uq_transfer.html">
<link title="Uq_socks5" rel="Chapter" href="Uq_socks5.html">
<link title="Uq_io" rel="Chapter" href="Uq_io.html">
<link title="Uq_lwt" rel="Chapter" href="Uq_lwt.html">
<link title="Uq_libevent" rel="Chapter" href="Uq_libevent.html">
<link title="Uq_mt" rel="Chapter" href="Uq_mt.html">
<link title="Uq_client" rel="Chapter" href="Uq_client.html">
<link title="Uq_server" rel="Chapter" href="Uq_server.html">
<link title="Uq_datagram" rel="Chapter" href="Uq_datagram.html">
<link title="Uq_engines_compat" rel="Chapter" href="Uq_engines_compat.html">
<link title="Equeue_intro" rel="Chapter" href="Equeue_intro.html">
<link title="Equeue_howto" rel="Chapter" href="Equeue_howto.html">
<link title="Netcamlbox" rel="Chapter" href="Netcamlbox.html">
<link title="Netcgi_apache" rel="Chapter" href="Netcgi_apache.html">
<link title="Netcgi_modtpl" rel="Chapter" href="Netcgi_modtpl.html">
<link title="Netcgi_plex" rel="Chapter" href="Netcgi_plex.html">
<link title="Netcgi_common" rel="Chapter" href="Netcgi_common.html">
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
<link title="Netcgi_ajp" rel="Chapter" href="Netcgi_ajp.html">
<link title="Netcgi_scgi" rel="Chapter" href="Netcgi_scgi.html">
<link title="Netcgi_cgi" rel="Chapter" href="Netcgi_cgi.html">
<link title="Netcgi_fcgi" rel="Chapter" href="Netcgi_fcgi.html">
<link title="Netcgi_dbi" rel="Chapter" href="Netcgi_dbi.html">
<link title="Netcgi1_compat" rel="Chapter" href="Netcgi1_compat.html">
<link title="Netcgi_test" rel="Chapter" href="Netcgi_test.html">
<link title="Netcgi_porting" rel="Chapter" href="Netcgi_porting.html">
<link title="Nethttp_client_conncache" rel="Chapter" href="Nethttp_client_conncache.html">
<link title="Nethttp_client" rel="Chapter" href="Nethttp_client.html">
<link title="Nettelnet_client" rel="Chapter" href="Nettelnet_client.html">
<link title="Netftp_data_endpoint" rel="Chapter" href="Netftp_data_endpoint.html">
<link title="Netftp_client" rel="Chapter" href="Netftp_client.html">
<link title="Nethttp_fs" rel="Chapter" href="Nethttp_fs.html">
<link title="Netftp_fs" rel="Chapter" href="Netftp_fs.html">
<link title="Netsmtp" rel="Chapter" href="Netsmtp.html">
<link title="Netpop" rel="Chapter" href="Netpop.html">
<link title="Netldap" rel="Chapter" href="Netldap.html">
<link title="Netclient_tut" rel="Chapter" href="Netclient_tut.html">
<link title="Netgss_bindings" rel="Chapter" href="Netgss_bindings.html">
<link title="Netgss" rel="Chapter" href="Netgss.html">
<link title="Nethttpd_types" rel="Chapter" href="Nethttpd_types.html">
<link title="Nethttpd_kernel" rel="Chapter" href="Nethttpd_kernel.html">
<link title="Nethttpd_reactor" rel="Chapter" href="Nethttpd_reactor.html">
<link title="Nethttpd_engine" rel="Chapter" href="Nethttpd_engine.html">
<link title="Nethttpd_services" rel="Chapter" href="Nethttpd_services.html">
<link title="Nethttpd_plex" rel="Chapter" href="Nethttpd_plex.html">
<link title="Nethttpd_util" rel="Chapter" href="Nethttpd_util.html">
<link title="Nethttpd_intro" rel="Chapter" href="Nethttpd_intro.html">
<link title="Netmcore" rel="Chapter" href="Netmcore.html">
<link title="Netmcore_camlbox" rel="Chapter" href="Netmcore_camlbox.html">
<link title="Netmcore_mempool" rel="Chapter" href="Netmcore_mempool.html">
<link title="Netmcore_heap" rel="Chapter" href="Netmcore_heap.html">
<link title="Netmcore_ref" rel="Chapter" href="Netmcore_ref.html">
<link title="Netmcore_array" rel="Chapter" href="Netmcore_array.html">
<link title="Netmcore_sem" rel="Chapter" href="Netmcore_sem.html">
<link title="Netmcore_mutex" rel="Chapter" href="Netmcore_mutex.html">
<link title="Netmcore_condition" rel="Chapter" href="Netmcore_condition.html">
<link title="Netmcore_queue" rel="Chapter" href="Netmcore_queue.html">
<link title="Netmcore_buffer" rel="Chapter" href="Netmcore_buffer.html">
<link title="Netmcore_matrix" rel="Chapter" href="Netmcore_matrix.html">
<link title="Netmcore_hashtbl" rel="Chapter" href="Netmcore_hashtbl.html">
<link title="Netmcore_process" rel="Chapter" href="Netmcore_process.html">
<link title="Netmcore_tut" rel="Chapter" href="Netmcore_tut.html">
<link title="Netmcore_basics" rel="Chapter" href="Netmcore_basics.html">
<link title="Netplex_types" rel="Chapter" href="Netplex_types.html">
<link title="Netplex_mp" rel="Chapter" href="Netplex_mp.html">
<link title="Netplex_mt" rel="Chapter" href="Netplex_mt.html">
<link title="Netplex_log" rel="Chapter" href="Netplex_log.html">
<link title="Netplex_controller" rel="Chapter" href="Netplex_controller.html">
<link title="Netplex_container" rel="Chapter" href="Netplex_container.html">
<link title="Netplex_sockserv" rel="Chapter" href="Netplex_sockserv.html">
<link title="Netplex_workload" rel="Chapter" href="Netplex_workload.html">
<link title="Netplex_main" rel="Chapter" href="Netplex_main.html">
<link title="Netplex_config" rel="Chapter" href="Netplex_config.html">
<link title="Netplex_kit" rel="Chapter" href="Netplex_kit.html">
<link title="Rpc_netplex" rel="Chapter" href="Rpc_netplex.html">
<link title="Netplex_cenv" rel="Chapter" href="Netplex_cenv.html">
<link title="Netplex_semaphore" rel="Chapter" href="Netplex_semaphore.html">
<link title="Netplex_sharedvar" rel="Chapter" href="Netplex_sharedvar.html">
<link title="Netplex_mutex" rel="Chapter" href="Netplex_mutex.html">
<link title="Netplex_encap" rel="Chapter" href="Netplex_encap.html">
<link title="Netplex_mbox" rel="Chapter" href="Netplex_mbox.html">
<link title="Netplex_internal" rel="Chapter" href="Netplex_internal.html">
<link title="Netplex_intro" rel="Chapter" href="Netplex_intro.html">
<link title="Netplex_advanced" rel="Chapter" href="Netplex_advanced.html">
<link title="Netplex_admin" rel="Chapter" href="Netplex_admin.html">
<link title="Netshm" rel="Chapter" href="Netshm.html">
<link title="Netshm_data" rel="Chapter" href="Netshm_data.html">
<link title="Netshm_hashtbl" rel="Chapter" href="Netshm_hashtbl.html">
<link title="Netshm_array" rel="Chapter" href="Netshm_array.html">
<link title="Netshm_intro" rel="Chapter" href="Netshm_intro.html">
<link title="Netstring_pcre" rel="Chapter" href="Netstring_pcre.html">
<link title="Netconversion" rel="Chapter" href="Netconversion.html">
<link title="Netchannels" rel="Chapter" href="Netchannels.html">
<link title="Netstream" rel="Chapter" href="Netstream.html">
<link title="Netmime_string" rel="Chapter" href="Netmime_string.html">
<link title="Netmime" rel="Chapter" href="Netmime.html">
<link title="Netsendmail" rel="Chapter" href="Netsendmail.html">
<link title="Neturl" rel="Chapter" href="Neturl.html">
<link title="Netaddress" rel="Chapter" href="Netaddress.html">
<link title="Netbuffer" rel="Chapter" href="Netbuffer.html">
<link title="Netmime_header" rel="Chapter" href="Netmime_header.html">
<link title="Netmime_channels" rel="Chapter" href="Netmime_channels.html">
<link title="Neturl_ldap" rel="Chapter" href="Neturl_ldap.html">
<link title="Netdate" rel="Chapter" href="Netdate.html">
<link title="Netencoding" rel="Chapter" href="Netencoding.html">
<link title="Netulex" rel="Chapter" href="Netulex.html">
<link title="Netaccel" rel="Chapter" href="Netaccel.html">
<link title="Netaccel_link" rel="Chapter" href="Netaccel_link.html">
<link title="Nethtml" rel="Chapter" href="Nethtml.html">
<link title="Netstring_str" rel="Chapter" href="Netstring_str.html">
<link title="Netmappings" rel="Chapter" href="Netmappings.html">
<link title="Netaux" rel="Chapter" href="Netaux.html">
<link title="Nethttp" rel="Chapter" href="Nethttp.html">
<link title="Netpagebuffer" rel="Chapter" href="Netpagebuffer.html">
<link title="Netfs" rel="Chapter" href="Netfs.html">
<link title="Netglob" rel="Chapter" href="Netglob.html">
<link title="Netauth" rel="Chapter" href="Netauth.html">
<link title="Netsockaddr" rel="Chapter" href="Netsockaddr.html">
<link title="Netnumber" rel="Chapter" href="Netnumber.html">
<link title="Netxdr_mstring" rel="Chapter" href="Netxdr_mstring.html">
<link title="Netxdr" rel="Chapter" href="Netxdr.html">
<link title="Netcompression" rel="Chapter" href="Netcompression.html">
<link title="Netunichar" rel="Chapter" href="Netunichar.html">
<link title="Netasn1" rel="Chapter" href="Netasn1.html">
<link title="Netasn1_encode" rel="Chapter" href="Netasn1_encode.html">
<link title="Netoid" rel="Chapter" href="Netoid.html">
<link title="Netstring_tstring" rel="Chapter" href="Netstring_tstring.html">
<link title="Netdn" rel="Chapter" href="Netdn.html">
<link title="Netx509" rel="Chapter" href="Netx509.html">
<link title="Netascii_armor" rel="Chapter" href="Netascii_armor.html">
<link title="Nettls_support" rel="Chapter" href="Nettls_support.html">
<link title="Netmech_scram" rel="Chapter" href="Netmech_scram.html">
<link title="Netmech_scram_gssapi" rel="Chapter" href="Netmech_scram_gssapi.html">
<link title="Netmech_scram_sasl" rel="Chapter" href="Netmech_scram_sasl.html">
<link title="Netmech_scram_http" rel="Chapter" href="Netmech_scram_http.html">
<link title="Netgssapi_support" rel="Chapter" href="Netgssapi_support.html">
<link title="Netgssapi_auth" rel="Chapter" href="Netgssapi_auth.html">
<link title="Netchannels_crypto" rel="Chapter" href="Netchannels_crypto.html">
<link title="Netx509_pubkey" rel="Chapter" href="Netx509_pubkey.html">
<link title="Netx509_pubkey_crypto" rel="Chapter" href="Netx509_pubkey_crypto.html">
<link title="Netsaslprep" rel="Chapter" href="Netsaslprep.html">
<link title="Netmech_plain_sasl" rel="Chapter" href="Netmech_plain_sasl.html">
<link title="Netmech_crammd5_sasl" rel="Chapter" href="Netmech_crammd5_sasl.html">
<link title="Netmech_digest_sasl" rel="Chapter" href="Netmech_digest_sasl.html">
<link title="Netmech_digest_http" rel="Chapter" href="Netmech_digest_http.html">
<link title="Netmech_krb5_sasl" rel="Chapter" href="Netmech_krb5_sasl.html">
<link title="Netmech_gs2_sasl" rel="Chapter" href="Netmech_gs2_sasl.html">
<link title="Netmech_spnego_http" rel="Chapter" href="Netmech_spnego_http.html">
<link title="Netchannels_tut" rel="Chapter" href="Netchannels_tut.html">
<link title="Netmime_tut" rel="Chapter" href="Netmime_tut.html">
<link title="Netsendmail_tut" rel="Chapter" href="Netsendmail_tut.html">
<link title="Netulex_tut" rel="Chapter" href="Netulex_tut.html">
<link title="Neturl_tut" rel="Chapter" href="Neturl_tut.html">
<link title="Netsys" rel="Chapter" href="Netsys.html">
<link title="Netsys_posix" rel="Chapter" href="Netsys_posix.html">
<link title="Netsys_pollset" rel="Chapter" href="Netsys_pollset.html">
<link title="Netlog" rel="Chapter" href="Netlog.html">
<link title="Netexn" rel="Chapter" href="Netexn.html">
<link title="Netsys_win32" rel="Chapter" href="Netsys_win32.html">
<link title="Netsys_pollset_posix" rel="Chapter" href="Netsys_pollset_posix.html">
<link title="Netsys_pollset_win32" rel="Chapter" href="Netsys_pollset_win32.html">
<link title="Netsys_pollset_generic" rel="Chapter" href="Netsys_pollset_generic.html">
<link title="Netsys_signal" rel="Chapter" href="Netsys_signal.html">
<link title="Netsys_oothr" rel="Chapter" href="Netsys_oothr.html">
<link title="Netsys_xdr" rel="Chapter" href="Netsys_xdr.html">
<link title="Netsys_rng" rel="Chapter" href="Netsys_rng.html">
<link title="Netsys_crypto_types" rel="Chapter" href="Netsys_crypto_types.html">
<link title="Netsys_types" rel="Chapter" href="Netsys_types.html">
<link title="Netsys_mem" rel="Chapter" href="Netsys_mem.html">
<link title="Netsys_tmp" rel="Chapter" href="Netsys_tmp.html">
<link title="Netsys_sem" rel="Chapter" href="Netsys_sem.html">
<link title="Netsys_pmanage" rel="Chapter" href="Netsys_pmanage.html">
<link title="Netsys_crypto" rel="Chapter" href="Netsys_crypto.html">
<link title="Netsys_tls" rel="Chapter" href="Netsys_tls.html">
<link title="Netsys_ciphers" rel="Chapter" href="Netsys_ciphers.html">
<link title="Netsys_digests" rel="Chapter" href="Netsys_digests.html">
<link title="Netsys_crypto_modes" rel="Chapter" href="Netsys_crypto_modes.html">
<link title="Netsys_gssapi" rel="Chapter" href="Netsys_gssapi.html">
<link title="Netsys_sasl_types" rel="Chapter" href="Netsys_sasl_types.html">
<link title="Netsys_sasl" rel="Chapter" href="Netsys_sasl.html">
<link title="Netsys_polypipe" rel="Chapter" href="Netsys_polypipe.html">
<link title="Netsys_polysocket" rel="Chapter" href="Netsys_polysocket.html">
<link title="Netsys_global" rel="Chapter" href="Netsys_global.html">
<link title="Nettls_gnutls_bindings" rel="Chapter" href="Nettls_gnutls_bindings.html">
<link title="Nettls_nettle_bindings" rel="Chapter" href="Nettls_nettle_bindings.html">
<link title="Nettls_gnutls" rel="Chapter" href="Nettls_gnutls.html">
<link title="Netunidata" rel="Chapter" href="Netunidata.html">
<link title="Netgzip" rel="Chapter" href="Netgzip.html">
<link title="Rpc_auth_local" rel="Chapter" href="Rpc_auth_local.html">
<link title="Rpc_xti_client" rel="Chapter" href="Rpc_xti_client.html">
<link title="Rpc" rel="Chapter" href="Rpc.html">
<link title="Rpc_program" rel="Chapter" href="Rpc_program.html">
<link title="Rpc_util" rel="Chapter" href="Rpc_util.html">
<link title="Rpc_portmapper_aux" rel="Chapter" href="Rpc_portmapper_aux.html">
<link title="Rpc_packer" rel="Chapter" href="Rpc_packer.html">
<link title="Rpc_transport" rel="Chapter" href="Rpc_transport.html">
<link title="Rpc_client" rel="Chapter" href="Rpc_client.html">
<link title="Rpc_simple_client" rel="Chapter" href="Rpc_simple_client.html">
<link title="Rpc_portmapper_clnt" rel="Chapter" href="Rpc_portmapper_clnt.html">
<link title="Rpc_portmapper" rel="Chapter" href="Rpc_portmapper.html">
<link title="Rpc_server" rel="Chapter" href="Rpc_server.html">
<link title="Rpc_auth_sys" rel="Chapter" href="Rpc_auth_sys.html">
<link title="Rpc_auth_gssapi" rel="Chapter" href="Rpc_auth_gssapi.html">
<link title="Rpc_proxy" rel="Chapter" href="Rpc_proxy.html">
<link title="Rpc_intro" rel="Chapter" href="Rpc_intro.html">
<link title="Rpc_mapping_ref" rel="Chapter" href="Rpc_mapping_ref.html">
<link title="Rpc_intro_gss" rel="Chapter" href="Rpc_intro_gss.html">
<link title="Shell_sys" rel="Chapter" href="Shell_sys.html">
<link title="Shell" rel="Chapter" href="Shell.html">
<link title="Shell_uq" rel="Chapter" href="Shell_uq.html">
<link title="Shell_fs" rel="Chapter" href="Shell_fs.html">
<link title="Shell_intro" rel="Chapter" href="Shell_intro.html">
<link title="Intro" rel="Chapter" href="Intro.html">
<link title="Platform" rel="Chapter" href="Platform.html">
<link title="Foreword" rel="Chapter" href="Foreword.html">
<link title="Ipv6" rel="Chapter" href="Ipv6.html">
<link title="Regexp" rel="Chapter" href="Regexp.html">
<link title="Tls" rel="Chapter" href="Tls.html">
<link title="Crypto" rel="Chapter" href="Crypto.html">
<link title="Authentication" rel="Chapter" href="Authentication.html">
<link title="Credentials" rel="Chapter" href="Credentials.html">
<link title="Gssapi" rel="Chapter" href="Gssapi.html">
<link title="Ocamlnet4" rel="Chapter" href="Ocamlnet4.html">
<link title="Get" rel="Chapter" href="Get.html"><link title="Debugging" rel="Section" href="#1_Debugging">
<link title="Examples and Discussion" rel="Subsection" href="#2_ExamplesandDiscussion">
<title>Ocamlnet 4 Reference Manual : Netftp_client</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Netftp_data_endpoint.html" title="Netftp_data_endpoint">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
<a class="post" href="Nethttp_fs.html" title="Nethttp_fs">Next</a>
</div>
<h1>Module <a href="type_Netftp_client.html">Netftp_client</a></h1>
<pre><span id="MODULENetftp_client"><span class="keyword">module</span> Netftp_client</span>: <code class="code">sig</code> <a href="Netftp_client.html">..</a> <code class="code">end</code></pre><div class="info module top">
<div class="info-desc">
<p>FTP client</p>
<p>Currently implements:</p>
<ul>
<li>Core FTP (RFC 959), except compressed transfer modes, and except page
files</li>
<li>Negotiation of FTP extensions (RFC 2389)</li>
<li>Common FTP extensions (RFC 3659)</li>
<li>IPv6 (RFC 2428)</li>
<li>Internationalization (RFC 2640)</li>
<li>Directory walking (NVFS) and direct access (TVFS)</li>
<li>TLS (it is required, though, that a TLS provider is initialized, see
<a href="Tls.html"><code class="code">Tls</code></a> for more information)</li>
<li>GSSAPI (RFC 2228)</li>
</ul>
<p>The client is written in asynchronous style (using <a href="Uq_engines.html"><code class="code">Uq_engines</code></a>).</p>
<p>The interface of this module was changed in Ocamlnet-3.3. Before this
release, the module was marked as "experimental". This is no longer
the case, as the interface has been updated, and the missing features
have been added (e.g. <code class="code">STOR</code> support).</p>
</div>
</div>
<hr width="100%">
<pre><span id="EXCEPTIONFTP_error"><span class="keyword">exception</span> FTP_error</span> <span class="keyword">of</span> <code class="type">exn</code></pre>
<div class="info ">
<div class="info-desc">
<p>Something went wrong, often on socket level</p>
</div>
</div>
<pre><span id="EXCEPTIONFTP_protocol_violation"><span class="keyword">exception</span> FTP_protocol_violation</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>The server violates the FTP specification</p>
</div>
</div>
<pre><span id="EXCEPTIONFTP_timeout"><span class="keyword">exception</span> FTP_timeout</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>A timeout on the control or data connection (this is a fatal error)</p>
</div>
</div>
<pre><span id="EXCEPTIONGSSAPI_error"><span class="keyword">exception</span> GSSAPI_error</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>An error on GSSAPI level</p>
</div>
</div>
<pre><span id="TYPEcmd_state"><span class="keyword">type</span> <code class="type"></code>cmd_state</span> = <code class="type">[ `Auth_data<br> | `Init<br> | `Not_connected<br> | `Pass_acct_seq<br> | `Perm_failure<br> | `Preliminary<br> | `Proto_error<br> | `Rename_seq<br> | `Restart_seq<br> | `Success<br> | `Temp_failure<br> | `User_acct_seq<br> | `User_pass_seq ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The command state:</p>
<ul>
<li><code class="code">`Not_connected</code>: Not connected.</li>
<li><code class="code">`Init</code>: Just connected, no greeting message arrived yet</li>
<li><code class="code">`Success</code>: Got the greeting message/last command was successful</li>
<li><code class="code">`Proto_error</code>: <b>currently unused</b></li>
<li><code class="code">`Temp_failure</code>: Last command was not successful, and the code
was between 400 and 499</li>
<li><code class="code">`Perm_failure</code>: Last command was not successful, and the code
was between 500 and 599</li>
<li><code class="code">`Rename_seq</code>: Used instead of <code class="code">`Success</code> after the RNFR command</li>
<li><code class="code">`Restart_seq</code>: Used instead of <code class="code">`Success</code> after the REST command</li>
<li><code class="code">`User_pass_seq</code>: Used instead of <code class="code">`Success</code> after the USER command
when a password must be typed in</li>
<li><code class="code">`User_acct_seq</code>: Used instead of <code class="code">`Success</code> after the USER command
when an account ID must be typed in</li>
<li><code class="code">`Pass_acct_seq</code>: Used instead of <code class="code">`Success</code> after the PASS command
when an account iD must be typed in</li>
<li><code class="code">`Preliminary</code>: a reply with code 100 to 199. There will be another
final reply for the command</li>
<li><code class="code">`Auth_data</code>: an ADAT reply inidicating that another round of
authentication is necessary.</li>
</ul>
</div>
</div>
<pre><span id="TYPEport"><span class="keyword">type</span> <code class="type"></code>port</span> = <code class="type">[ `Active of string * int * Unix.file_descr<br> | `Ext_active of string * int * Unix.file_descr<br> | `Ext_passive of int<br> | `Passive of string * int<br> | `Unspecified ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The port of the data connection: <code class="code">`Active</code> means that the server
initiates the data connection to the listening client, and in the
case of <code class="code">`Passive</code> the client initiates the data connection to the
listening server. The string argument is the IP address as dotted
quad, the int argument is the port number, and the descriptor
is the listening master socket.</p>
</div>
</div>
<pre><span id="TYPEform_code"><span class="keyword">type</span> <code class="type"></code>form_code</span> = <code class="type">[ `ASA | `Non_print | `Telnet ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The <code class="code">form_code</code> has a meaning when FTP is used to print files:</p>
<ul>
<li><code class="code">`Non_print</code>: This is not the case.</li>
<li><code class="code">`Telnet</code>: Telnet control codes are used for vertical movement</li>
<li><code class="code">`ASA</code>: ASA (Fortran) control codes are used for vertical movement</li>
</ul>
</div>
</div>
<pre><span id="TYPErepresentation"><span class="keyword">type</span> <code class="type"></code>representation</span> = <code class="type">[ `ASCII of <a href="Netftp_client.html#TYPEform_code">form_code</a> option<br> | `EBCDIC of <a href="Netftp_client.html#TYPEform_code">form_code</a> option<br> | `Image ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The representation of the transferred file:</p>
<ul>
<li><code class="code">`ASCII</code>: An ASCII variant is used, i.e. the server sends files in
ASCII encoding with CR/LF as end-of-line marker. Supported by all
servers.</li>
<li><code class="code">`EBCDIC</code>: An EBCDIC variant is used, i.e. the server sends files in
EBCDIC encoding with NEL as end-of-line marker</li>
<li><code class="code">`Image</code>: The file is transferred in its original binary
representation. Supported by all servers.</li>
</ul>
<p>"Local" representations are not supported.</p>
<p>This FTP client does not recode the files such that they match the
selected representation. When files are downloaded, they are stored
as they are received. When files are uploaded, they are sent as they
are. The user of this client must do recodings when necessary
(the class <a href="Netftp_data_endpoint.data_converter-c.html"><code class="code">Netftp_data_endpoint.data_converter</code></a> may be useful for this).</p>
<p>If no representation is selected, FTP servers assume <code class="code">`ASCII None</code>
as default.</p>
</div>
</div>
<pre><span id="TYPEstructure"><span class="keyword">type</span> <code class="type"></code>structure</span> = <code class="type">[ `File_structure | `Record_structure ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The client supports two structures:</p>
<ul>
<li><code class="code">`File_structure</code>: Files are simply contiguous streams of bytes</li>
<li><code class="code">`Record_structure</code>: Files are sequences of records. FTP does
not make a difference between variable and fixed length records.
It is not forbidden that the records are themselves structured
into lines, in fact it can happen that end-of-line markers are
contained in binary records. Operating systems that support
record-structured files often store text files in this format, i.e.
every line is stored in its own record, without end-of-line marker.
If record structure is selected by a STRU command, it is recommended
to use the classes <a href="Netftp_data_endpoint.out_record_channel-c.html"><code class="code">Netftp_data_endpoint.out_record_channel</code></a> and
<a href="Netftp_data_endpoint.in_record_channel-c.html"><code class="code">Netftp_data_endpoint.in_record_channel</code></a> for the local representation
of the files, otherwise the records may be incorrectly mapped
to the local conventions.</li>
</ul>
<p>Page-structured files (i.e. indexed files) are not supported.</p>
<p>If no structure is selected, FTP servers will assume file structure
as default.</p>
</div>
</div>
<pre><span id="TYPEtransmission_mode"><span class="keyword">type</span> <code class="type"></code>transmission_mode</span> = <code class="type">[ `Block_mode | `Stream_mode ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The transmission mode selects how the data are encoded in the data
connection.</p>
<ul>
<li><code class="code">`Stream_mode</code>: This is the simple format that is responsible for
all the failed FTP downloads. It is supported by all FTP servers,
actually, you cannot assume a better transmission mode from an
unknown FTP server. It is unreliable because it cannot distinguish
between a transmission failure and the regular end-of-file condition.</li>
<li><code class="code">`Block_mode</code>: This is an improved format using frames to protect
the transmitted data. Unfortunately, almost no FTP server supports
it.</li>
</ul>
<p>Both modes are compatible with both structures, i.e. you can transfer
a record-structured file in stream mode and a flat file in block
mode. However, in practice this is not the case. Servers that only
know flat files are likely to only support stream mode, and servers
implementing record structure imply that block transfers base on
the record format. So the advice is to use stream mode for flat
files, and block mode for record files.</p>
</div>
</div>
<pre><span id="TYPEftp_auth"><span class="keyword">type</span> <code class="type"></code>ftp_auth</span> = <code class="type">[ `GSSAPI | `None | `TLS ]</code> </pre>
<pre><span id="TYPEftp_data_prot"><span class="keyword">type</span> <code class="type"></code>ftp_data_prot</span> = <code class="type">[ `C | `E | `P | `S ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>Meaning:</p>
<ul>
<li><code class="code">`C</code>: no protection (clear)</li>
<li><code class="code">`S</code>: integrity protection</li>
<li><code class="code">`E</code>: encryption without integrity protection</li>
<li><code class="code">`P</code>: integrity protection and encryption (= privacy)</li>
</ul>
</div>
</div>
<pre><span id="TYPEsupport_level"><span class="keyword">type</span> <code class="type"></code>support_level</span> = <code class="type">[ `If_possible | `None | `Required ]</code> </pre>
<pre><code><span id="TYPEftp_state"><span class="keyword">type</span> <code class="type"></code>ftp_state</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.cmd_state">cmd_state</span> : <code class="type"><a href="Netftp_client.html#TYPEcmd_state">cmd_state</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>the command state</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_connected">ftp_connected</span> : <code class="type">bool</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>whether connected with the server</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_data_conn">ftp_data_conn</span> : <code class="type">bool</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>whether there is a clean data conn</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_user">ftp_user</span> : <code class="type">string option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>successfully sent user identifier</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_password">ftp_password</span> : <code class="type">string option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>successfully sent password</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_account">ftp_account</span> : <code class="type">string option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>successfully sent account identifier</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_logged_in">ftp_logged_in</span> : <code class="type">bool</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>whether the user is logged in</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_host">ftp_host</span> : <code class="type">string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Host name</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_port">ftp_port</span> : <code class="type"><a href="Netftp_client.html#TYPEport">port</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>the selected port</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_repr">ftp_repr</span> : <code class="type"><a href="Netftp_client.html#TYPErepresentation">representation</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>the selected representation</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_structure">ftp_structure</span> : <code class="type"><a href="Netftp_client.html#TYPEstructure">structure</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>the selected structure</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_trans">ftp_trans</span> : <code class="type"><a href="Netftp_client.html#TYPEtransmission_mode">transmission_mode</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>the selected trans mode</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_dir">ftp_dir</span> : <code class="type">string list</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The current directory, expressed as list of CWD changes minus
CDUP changes. This is only reasonable if CWD does not include
slashes. The list is in reverse order, i.e. deepest directory
first.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_features">ftp_features</span> : <code class="type">(string * string option) list option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The list of features returned by the last FEAT command.
<code class="code">None</code> means that no FEAT command was yet tried.
<code class="code">Some []</code> means that there are no features (either FEAT
returned an empty list, or the FEAT command is not implemented
by the server). Otherwise the list enumerates pairs
<code class="code">(label,param)</code> where <code class="code">label</code> is the case-sensitive feature
label and <code class="code">param</code> the optional parameter. There is no
defined order for the list of features.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_options">ftp_options</span> : <code class="type">(string * string option) list</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Remembers the OPTS commands sent to the server. The list
enumerates pairs <code class="code">(command,optionparam)</code>, where <code class="code">command</code>
is the uppercase command name the option refers to. Only
the last negotiated <code class="code">optionparam</code> for the command is remembered.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_auth">ftp_auth</span> : <code class="type"><a href="Netftp_client.html#TYPEftp_auth">ftp_auth</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Authentication/privacy mode (AUTH command)</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_auth_data">ftp_auth_data</span> : <code class="type">string option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The data from the last ADAT reply, already base64-decoded</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_data_prot">ftp_data_prot</span> : <code class="type"><a href="Netftp_client.html#TYPEftp_data_prot">ftp_data_prot</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Security protocol for data connections (PROT command)</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_data_pbsz">ftp_data_pbsz</span> : <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>protection buffer size (PBSZ command)</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTftp_state.ftp_prot">ftp_prot</span> : <code class="type"><a href="Netftp_data_endpoint.html#TYPEftp_protector">Netftp_data_endpoint.ftp_protector</a> option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>a security layer (RFC 2228)</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}
<div class="info ">
<div class="info-desc">
<p>The ftp_state reflects the knowledge of the client about what has been
agreed upon with the server.</p>
</div>
</div>
<pre><span id="TYPEcmd"><span class="keyword">type</span> <code class="type"></code>cmd</span> = <code class="type">[ `ACCT of string<br> | `ADAT of string<br> | `ALLO of int * int option<br> | `APPE of<br> string * (<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_sender">Netftp_data_endpoint.local_sender</a>)<br> | `AUTH of string<br> | `CDUP<br> | `CWD of string<br> | `Connect of string * int<br> | `DELE of string<br> | `Disconnect<br> | `Dummy<br> | `EPRT<br> | `EPSV of [ `AF of Unix.socket_domain | `ALL ] option<br> | `FEAT<br> | `HELP of string option<br> | `LANG of string option<br> | `LIST of<br> string option *<br> (<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>)<br> | `MDTM of string<br> | `MKD of string<br> | `MLSD of<br> string option *<br> (<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>)<br> | `MLST of string option<br> | `MODE of <a href="Netftp_client.html#TYPEtransmission_mode">transmission_mode</a><br> | `NLST of<br> string option *<br> (<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>)<br> | `NOOP<br> | `OPTS of string * string option<br> | `PASS of string<br> | `PASV<br> | `PBSZ of int<br> | `PORT<br> | `PROT of <a href="Netftp_client.html#TYPEftp_data_prot">ftp_data_prot</a><br> | `PWD<br> | `QUIT<br> | `REIN<br> | `REST of string<br> | `RETR of<br> string * (<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>)<br> | `RMD of string<br> | `RNFR of string<br> | `RNTO of string<br> | `SITE of string<br> | `SIZE of string<br> | `SMNT of string<br> | `STAT of string option<br> | `STOR of<br> string * (<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_sender">Netftp_data_endpoint.local_sender</a>)<br> | `STOU of <a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_sender">Netftp_data_endpoint.local_sender</a><br> | `STRU of <a href="Netftp_client.html#TYPEstructure">structure</a><br> | `SYST<br> | `Start_TLS of (module Netsys_crypto_types.TLS_CONFIG)<br> | `Start_protection of <a href="Netftp_data_endpoint.html#TYPEftp_protector">Netftp_data_endpoint.ftp_protector</a><br> | `TYPE of <a href="Netftp_client.html#TYPErepresentation">representation</a><br> | `USER of string ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>An FTP command. Not all commands are implemented by all servers.</p>
<p><code class="code">`Start_TLS</code> is a pseudo command - at this point the TLS handshake
starts.</p>
</div>
</div>
<pre><span id="TYPEreply"><span class="keyword">type</span> <code class="type"></code>reply</span> = <code class="type">int * string</code> </pre>
<div class="info ">
<div class="info-desc">
<p>Reply code plus text</p>
</div>
</div>
<pre><span id="TYPEftp_client_pi"><span class="keyword">class type</span> <a href="Netftp_client.ftp_client_pi-c.html">ftp_client_pi</a></span> = <code class="code">object</code> <a href="Netftp_client.ftp_client_pi-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>The client protocol interpreter...</p>
</div>
<pre><span id="TYPEftp_method"><span class="keyword">type</span> <code class="type"></code>ftp_method</span> = <code class="type"><a href="Netftp_client.ftp_client_pi-c.html">ftp_client_pi</a> -> unit <a href="Uq_engines.engine-c.html">Uq_engines.engine</a></code> </pre>
<div class="info ">
<div class="info-desc">
<p>An <code class="code">ftp_method</code> is a small procedure doing some task</p>
</div>
</div>
<pre><span id="EXCEPTIONFTP_method_temp_failure"><span class="keyword">exception</span> FTP_method_temp_failure</span> <span class="keyword">of</span> <code class="type">int * string</code></pre>
<pre><span id="EXCEPTIONFTP_method_perm_failure"><span class="keyword">exception</span> FTP_method_perm_failure</span> <span class="keyword">of</span> <code class="type">int * string</code></pre>
<pre><span id="EXCEPTIONFTP_method_unexpected_reply"><span class="keyword">exception</span> FTP_method_unexpected_reply</span> <span class="keyword">of</span> <code class="type">int * string</code></pre>
<div class="info ">
<div class="info-desc">
<p>These exceptions may be raised during execution by the FTP method.
The int is the unexpected FTP control code and the string the
corresponding text. A temporary failure has a code between 400 and
499, and a permanent failure has a code between 500 and 599.</p>
</div>
</div>
<pre><span id="VALconnect_method"><span class="keyword">val</span> connect_method</span> : <code class="type">host:string -> ?port:int -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This method connects to the <code class="code">host</code></p>
</div>
</div>
<pre><span id="VALlogin_method"><span class="keyword">val</span> login_method</span> : <code class="type">user:string -><br> get_password:(unit -> string) -><br> get_account:(unit -> string) -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This FTP method logs the <code class="code">user</code> in. <code class="code">get_password</code> is called when
the FTP server asks for the password (may be skipped). <code class="code">get_account</code>
is called when the server asks for the account ID (may be skipped).</p>
</div>
</div>
<pre><span id="VALquit_method"><span class="keyword">val</span> quit_method</span> : <code class="type">unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Quits and disconnects</p>
</div>
</div>
<pre><span id="VALtls_method"><span class="keyword">val</span> tls_method</span> : <code class="type">config:(module Netsys_crypto_types.TLS_CONFIG) -><br> required:bool -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This FTP method negotiates the use of TLS. If <code class="code">required</code>, it is
an error if TLS is not supported. Otherwise, it is ok to omit the TLS
protection.</p>
</div>
</div>
<pre><span id="VALgssapi_method"><span class="keyword">val</span> gssapi_method</span> : <code class="type">config:<a href="Netsys_gssapi.client_config-c.html">Netsys_gssapi.client_config</a> -><br> required:bool -> (module Netsys_gssapi.GSSAPI) -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This method negotiates the use of GSSAPI authentication and security.
You need to pass the GSSAPI provider (e.g. <a href="Netgss.System.html"><code class="code">Netgss.System</code></a>).</p>
<p>The <code class="code">config</code> can often simply be created with
<code class="code">Netsys_gssapi.create_client_config()</code>, as normally reasonably
defaults are assumed by the GSSAPI provider. See
<a href="Netsys_gssapi.html#VALcreate_client_config"><code class="code">Netsys_gssapi.create_client_config</code></a> for options.</p>
<p>If <code class="code">required</code>, it is an error if the server doesn't support GSSAPI
authentication. Otherwise, this method is a no-op in this case.</p>
<p>Note that you cannot combine <code class="code">gssapi_method</code> with <code class="code">tls_method</code>.
Although the <code class="code">gssapi_method</code> authenticates the user, you still need
to log in, although without password (basically, GSSAPI just gives
you permissions to be somebody, but you still need to select who you
want to be).</p>
</div>
</div>
<pre><span id="VALwalk_method"><span class="keyword">val</span> walk_method</span> : <code class="type">[ `Dir of string | `File of string | `Stay ] -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This FTP method walks to the target directory:</p>
<ul>
<li><code class="code">`File name</code>: The <code class="code">name</code> is interpreted as slash-separated path.
It is always interpreted relative to the home directory of the
user (i.e. the directory after login), even if it begins with a
slash. The FTP command walks to the directory containing <code class="code">name</code>.</li>
<li><code class="code">`Dir name</code>: The FTP command walks to the directory <code class="code">name</code> (same
syntax as for <code class="code">`File</code>).</li>
<li><code class="code">`Stay</code>: The FTP command does nothing (stays in the current directory).</li>
</ul>
</div>
</div>
<pre><span id="TYPEfilename"><span class="keyword">type</span> <code class="type"></code>filename</span> = <code class="type">[ `NVFS of string | `TVFS of string | `Verbatim of string ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>There are several methods how to specify filenames:</p>
<ul>
<li><code class="code">`NVFS name</code>: The "Network Virtual File System" is the normal way
of accessing FTP files. The client walks into the directory containing
the file using <code class="code">CWD</code> and <code class="code">CDUP</code> commands, and calls the file operation
from this directory. For simplicity, this client interprets slashes
in <code class="code">name</code> as path component separators. The FTP server will never
see these slashes.</li>
<li><code class="code">`TVFS name</code>: The optional "Trivial Network File System" avoids the
<code class="code">CWD</code> and <code class="code">CDUP</code> commands. The tagged <code class="code">name</code> is normalized (double
slashed removed etc.), and is passed to the server as-is. Before using
the faster TVFS one should check whether it is supported (feature
"TVFS"). Note that even for TVFS there are no special files "."
and ".."!</li>
<li><code class="code">`Verbatim name</code>: The string <code class="code">name</code> is passed to the server without
transforming it in any way.</li>
</ul>
</div>
</div>
<pre><span id="VALget_method"><span class="keyword">val</span> get_method</span> : <code class="type">file:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> representation:<a href="Netftp_client.html#TYPErepresentation">representation</a> -><br> store:(<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This FTP method walks to the right directory and gets <code class="code">file</code> from
the server. The file is stored in the <code class="code">local_receiver</code> that can be
obtained by calling the <code class="code">store</code> function. The selected <code class="code">representation</code>
remains unchanged.</p>
</div>
</div>
<pre><span id="VALput_method"><span class="keyword">val</span> put_method</span> : <code class="type">?meth:[ `APPE | `STOR ] -><br> file:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> representation:<a href="Netftp_client.html#TYPErepresentation">representation</a> -><br> store:(<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_sender">Netftp_data_endpoint.local_sender</a>) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This FTP method walks to the right directory and puts <code class="code">file</code> to
the server. The file is taken from the <code class="code">local_sender</code> that can be
obtained by calling the <code class="code">store</code> function. The selected <code class="code">representation</code>
remains unchanged.</p>
<p><code class="code">meth</code> selects the method to use (default <code class="code">`STOR</code>).</p>
</div>
</div>
<pre><span id="VALinvoke_method"><span class="keyword">val</span> invoke_method</span> : <code class="type">command:<a href="Netftp_client.html#TYPEcmd">cmd</a> -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>This FTP method simply invokes <code class="code">command</code>.</p>
</div>
</div>
<pre><span id="VALset_structure_method"><span class="keyword">val</span> set_structure_method</span> : <code class="type"><a href="Netftp_client.html#TYPEstructure">structure</a> -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Requests a certain structure for future file transfers</p>
</div>
</div>
<pre><span id="VALset_mode_method"><span class="keyword">val</span> set_mode_method</span> : <code class="type"><a href="Netftp_client.html#TYPEtransmission_mode">transmission_mode</a> -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Requests a certain mode for future file transfers</p>
</div>
</div>
<pre><span id="VALrename_method"><span class="keyword">val</span> rename_method</span> : <code class="type">file_from:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> file_to:<a href="Netftp_client.html#TYPEfilename">filename</a> -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Renames the <code class="code">file_from</code> into <code class="code">file_to</code>.</p>
<p>Both file names must be of the same type, either <code class="code">`NVFS</code> or <code class="code">`Verbatim</code>.
If <code class="code">`NVFS</code>, both names must be in the same directory.</p>
</div>
</div>
<pre><span id="VALmkdir_method"><span class="keyword">val</span> mkdir_method</span> : <code class="type"><a href="Netftp_client.html#TYPEfilename">filename</a> -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Creates the named directory</p>
</div>
</div>
<pre><span id="VALrmdir_method"><span class="keyword">val</span> rmdir_method</span> : <code class="type"><a href="Netftp_client.html#TYPEfilename">filename</a> -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Deletes the named directory</p>
</div>
</div>
<pre><span id="VALdelete_method"><span class="keyword">val</span> delete_method</span> : <code class="type"><a href="Netftp_client.html#TYPEfilename">filename</a> -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Deletes the named file</p>
</div>
</div>
<pre><span id="VALlist_method"><span class="keyword">val</span> list_method</span> : <code class="type">dir:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> representation:<a href="Netftp_client.html#TYPErepresentation">representation</a> -><br> store:(<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Lists the contents of the directory <code class="code">dir</code> using the LIST command.
The <code class="code">representation</code> must not be <code class="code">`Image</code>.</p>
</div>
</div>
<pre><span id="VALnlst_method"><span class="keyword">val</span> nlst_method</span> : <code class="type">dir:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> representation:<a href="Netftp_client.html#TYPErepresentation">representation</a> -><br> store:(<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Lists the contents of the directory <code class="code">dir</code> using the NLST command
The <code class="code">representation</code> must not be <code class="code">`Image</code>.</p>
</div>
</div>
<pre><span id="VALparse_nlst_document"><span class="keyword">val</span> parse_nlst_document</span> : <code class="type">string -> string list</code></pre><div class="info ">
<div class="info-desc">
<p>Returns the filenames contained in the output of <code class="code">`NLST</code></p>
</div>
</div>
<pre><span id="VALmdtm_method"><span class="keyword">val</span> mdtm_method</span> : <code class="type">file:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> process_result:(float -> unit) -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Determines the date and time of the last modification of <code class="code">file</code>.
On success, <code class="code">process_result</code> is called.</p>
</div>
</div>
<pre><span id="VALsize_method"><span class="keyword">val</span> size_method</span> : <code class="type">file:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> representation:<a href="Netftp_client.html#TYPErepresentation">representation</a> -><br> process_result:(int64 -> unit) -> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Determines the size of <code class="code">file</code>. On success, <code class="code">process_result</code> is called.
The size depends on <code class="code">representation</code>.</p>
</div>
</div>
<pre><span id="VALfeat_method"><span class="keyword">val</span> feat_method</span> : <code class="type">?process_result:((string * string option) list -> unit) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Get the list of feature tokens (see also
<a href="Netftp_client.html#TYPEELTftp_state.ftp_features"><code class="code">Netftp_client.ftp_state.ftp_features</code></a>)</p>
</div>
</div>
<pre><span id="TYPEentry"><span class="keyword">type</span> <code class="type"></code>entry</span> = <code class="type">string * (string * string) list</code> </pre>
<div class="info ">
<div class="info-desc">
<p>A file entry <code class="code">(name, facts)</code>. The facts are given as pairs
<code class="code">(factname,value)</code> where <code class="code">factname</code> is always lowercase.
For parsers for common facts see below.</p>
</div>
</div>
<pre><span id="VALmlst_method"><span class="keyword">val</span> mlst_method</span> : <code class="type">file:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> process_result:(<a href="Netftp_client.html#TYPEentry">entry</a> list -> unit) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Get the file entry for <code class="code">file</code>.</p>
</div>
</div>
<pre><span id="VALmlsd_method"><span class="keyword">val</span> mlsd_method</span> : <code class="type">dir:<a href="Netftp_client.html#TYPEfilename">filename</a> -><br> store:(<a href="Netftp_client.html#TYPEftp_state">ftp_state</a> -> <a href="Netftp_data_endpoint.html#TYPElocal_receiver">Netftp_data_endpoint.local_receiver</a>) -><br> unit -> <a href="Netftp_client.html#TYPEftp_method">ftp_method</a></code></pre><div class="info ">
<div class="info-desc">
<p>Gets the entries for this directory.</p>
</div>
</div>
<pre><span id="VALparse_mlsd_document"><span class="keyword">val</span> parse_mlsd_document</span> : <code class="type">string -> <a href="Netftp_client.html#TYPEentry">entry</a> list</code></pre><div class="info ">
<div class="info-desc">
<p>Returns the entries contained in the output of <code class="code">`MLSD</code></p>
</div>
</div>
<pre><span id="TYPEentry_type"><span class="keyword">type</span> <code class="type"></code>entry_type</span> = <code class="type">[ `Cdir | `Dir | `File | `Other | `Pdir ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>Types:</p>
<ul>
<li><code class="code">`File</code>: entry refers to file</li>
<li><code class="code">`Cdir</code>: entry refers to the directory being listed</li>
<li><code class="code">`Pdir</code>: entry is a parent of the directory being listed</li>
<li><code class="code">`Dir</code>: entry refers to directory</li>
<li><code class="code">`Other</code>: entry is neither file nor directory</li>
</ul>
</div>
</div>
<pre><span id="TYPEentry_perm"><span class="keyword">type</span> <code class="type"></code>entry_perm</span> = <code class="type">[ `Append<br> | `Create<br> | `Delete<br> | `Delete_member<br> | `Enter<br> | `List<br> | `Mkdir<br> | `Read<br> | `Rename<br> | `Write ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>Permissions:</p>
<ul>
<li><code class="code">`Append</code>: append to file possible</li>
<li><code class="code">`Create</code>: file can be created in this dir</li>
<li><code class="code">`Delete</code>: file or dir can be deleted</li>
<li><code class="code">`Enter</code>: dir can be entered</li>
<li><code class="code">`Rename</code>: file or dir can be renamed</li>
<li><code class="code">`List</code>: dir can be listed</li>
<li><code class="code">`Mkdir</code>: subdir can be created in this dir</li>
<li><code class="code">`Delete_member</code>: a file or dir can be deleted in this directory</li>
<li><code class="code">`Read</code>: a file can be retrieved</li>
<li><code class="code">`Write</code>: a file can be stored</li>
</ul>
</div>
</div>
<p>The following functions extract commonly used facts from entries.
They may raise <code class="code">Not_found</code>.</p>
<pre><span id="VALget_name"><span class="keyword">val</span> get_name</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="VALget_size"><span class="keyword">val</span> get_size</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> int64</code></pre>
<pre><span id="VALget_modify"><span class="keyword">val</span> get_modify</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> float</code></pre>
<pre><span id="VALget_create"><span class="keyword">val</span> get_create</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> float</code></pre>
<pre><span id="VALget_type"><span class="keyword">val</span> get_type</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> <a href="Netftp_client.html#TYPEentry_type">entry_type</a></code></pre>
<pre><span id="VALget_unique"><span class="keyword">val</span> get_unique</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="VALget_perm"><span class="keyword">val</span> get_perm</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> <a href="Netftp_client.html#TYPEentry_perm">entry_perm</a> list</code></pre>
<pre><span id="VALget_lang"><span class="keyword">val</span> get_lang</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="VALget_media_type"><span class="keyword">val</span> get_media_type</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="VALget_charset"><span class="keyword">val</span> get_charset</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="VALget_unix_mode"><span class="keyword">val</span> get_unix_mode</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> int</code></pre>
<pre><span id="VALget_unix_uid"><span class="keyword">val</span> get_unix_uid</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="VALget_unix_gid"><span class="keyword">val</span> get_unix_gid</span> : <code class="type"><a href="Netftp_client.html#TYPEentry">entry</a> -> string</code></pre>
<pre><span id="TYPEftp_client"><span class="keyword">class</span> <a href="Netftp_client.ftp_client-c.html">ftp_client</a></span> : <code class="type">?event_system:<a href="Unixqueue.event_system-c.html">Unixqueue.event_system</a> -> unit -> </code><code class="code">object</code> <a href="Netftp_client.ftp_client-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>The ftp client is a user session that may even span several connections.</p>
</div>
<h3 id="2_ExamplesandDiscussion">Examples and Discussion</h3>
<p>To download a single flat file from a server:</p>
<pre class="codepre"><code class="code">
let buffer = Buffer.create 1000 in
let ch = new Netchannels.output_buffer buffer in
let client = new ftp_client() in
client # exec (connect_method ~host:"127.0.0.1" ());
client # exec (login_method ~user:"foo"
~get_password:(fun () -> "password")
~get_account:(fun () -> "foo") ());
client # exec (get_method ~file:(`NVFS "path/to/file")
~representation:`Image
~store:(fun _ -> `File_structure ch) ());
</code></pre>
<p>The file is stored in <code class="code">buffer</code>. By using a different netchannel, it
can be stored whereever wanted.</p>
<p>To download a record-structured text file, use a <code class="code">store</code> like:</p>
<pre class="codepre"><code class="code">
let ch = (as above) in
let rec_ch = new Netftp_data_endpoint.write_out_record_channel
~repr:(`ASCII_unix `Enc_iso88591)
ch
...
... ~store:(fun _ -> `Record_structure rec_ch)
</code></pre>
<p>Here, the end-of-record is transcoded to newline. Note that the ASCII
variant (<code class="code">`Enc_iso88591</code>) is ignored by <code class="code">write_out_record_channel</code>.
<b>Open: How to select record structure using an FTP method.</b></p>
<p>Character conversions: To convert an EBCDIC file to ASCII, use
something like</p>
<pre class="codepre"><code class="code">
let ch = (as above) in
let converter = new Netftp_data_endpoint.data_converter
~fromrepr:(`EBCDIC `Enc_cp1047)
~torepr:(`ASCII_unix `Enc_iso88591) in
let ch_ebcdic = new Netchannels.output_filter converter ch in
...
... ~representation:(`EBCDIC None)
... ~store:(fun _ -> `File_structure ch_ebcdic)
</code></pre>
<p>The class <code class="code">data_converter</code> also performs the transformation of the
end-of-line convention, unlike the similar class
<code class="code">Netconversion.conversion_pipe</code>.</p>
<h2 id="1_Debugging">Debugging</h2>
<pre><span id="MODULEDebug"><span class="keyword">module</span> <a href="Netftp_client.Debug.html">Debug</a></span>: <code class="code">sig</code> <a href="Netftp_client.Debug.html">..</a> <code class="code">end</code></pre></body></html>
|