/usr/share/doc/libcommons-net2-java/api/org/apache/commons/net/SocketClient.html is in libcommons-net2-java-doc 2.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_23) on Wed Oct 19 08:52:35 UTC 2011 -->
<TITLE>
SocketClient (libcommons-net2-java API)
</TITLE>
<META NAME="date" CONTENT="2011-10-19">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SocketClient (libcommons-net2-java API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/net/ProtocolCommandSupport.html" title="class in org.apache.commons.net"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/commons/net/SocketClient.html" target="_top"><B>FRAMES</B></A>
<A HREF="SocketClient.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.net</FONT>
<BR>
Class SocketClient</H2>
<PRE>
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.net.SocketClient</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/commons/net/chargen/CharGenTCPClient.html" title="class in org.apache.commons.net.chargen">CharGenTCPClient</A>, <A HREF="../../../../org/apache/commons/net/daytime/DaytimeTCPClient.html" title="class in org.apache.commons.net.daytime">DaytimeTCPClient</A>, <A HREF="../../../../org/apache/commons/net/discard/DiscardTCPClient.html" title="class in org.apache.commons.net.discard">DiscardTCPClient</A>, <A HREF="../../../../org/apache/commons/net/finger/FingerClient.html" title="class in org.apache.commons.net.finger">FingerClient</A>, <A HREF="../../../../org/apache/commons/net/ftp/FTP.html" title="class in org.apache.commons.net.ftp">FTP</A>, <A HREF="../../../../org/apache/commons/net/nntp/NNTP.html" title="class in org.apache.commons.net.nntp">NNTP</A>, <A HREF="../../../../org/apache/commons/net/pop3/POP3.html" title="class in org.apache.commons.net.pop3">POP3</A>, <A HREF="../../../../org/apache/commons/net/bsd/RExecClient.html" title="class in org.apache.commons.net.bsd">RExecClient</A>, <A HREF="../../../../org/apache/commons/net/smtp/SMTP.html" title="class in org.apache.commons.net.smtp">SMTP</A>, <A HREF="../../../../org/apache/commons/net/telnet/TelnetClient.html" title="class in org.apache.commons.net.telnet">TelnetClient</A>, <A HREF="../../../../org/apache/commons/net/time/TimeTCPClient.html" title="class in org.apache.commons.net.time">TimeTCPClient</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>SocketClient</B><DT>extends <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
The SocketClient provides the basic operations that are required of
client objects accessing sockets. It is meant to be
subclassed to avoid having to rewrite the same code over and over again
to open a socket, close a socket, set timeouts, etc. Of special note
is the <A HREF="../../../../org/apache/commons/net/SocketClient.html#setSocketFactory(javax.net.SocketFactory)"><CODE>setSocketFactory </CODE></A>
method, which allows you to control the type of Socket the SocketClient
creates for initiating network connections. This is especially useful
for adding SSL or proxy support as well as better support for applets. For
example, you could create a
<A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net"><CODE>SocketFactory</CODE></A> that
requests browser security capabilities before creating a socket.
All classes derived from SocketClient should use the
<A HREF="../../../../org/apache/commons/net/SocketClient.html#_socketFactory_"><CODE>_socketFactory_ </CODE></A> member variable to
create Socket and ServerSocket instances rather than instanting
them by directly invoking a constructor. By honoring this contract
you guarantee that a user will always be able to provide his own
Socket implementations by substituting his own SocketFactory.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Daniel F. Savarese</DD>
<DT><B>See Also:</B><DD><A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net"><CODE>SocketFactory</CODE></A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_">_defaultPort_</A></B></CODE>
<BR>
The default port the client should connect to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_input_">_input_</A></B></CODE>
<BR>
The socket's InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_output_">_output_</A></B></CODE>
<BR>
The socket's OutputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_serverSocketFactory_">_serverSocketFactory_</A></B></CODE>
<BR>
The socket's ServerSocket Factory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_socket_">_socket_</A></B></CODE>
<BR>
The socket used for the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_socketFactory_">_socketFactory_</A></B></CODE>
<BR>
The socket's SocketFactory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_timeout_">_timeout_</A></B></CODE>
<BR>
The timeout to use after opening a socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connectTimeout">connectTimeout</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#NETASCII_EOL">NETASCII_EOL</A></B></CODE>
<BR>
The end of line character sequence used by most IETF protocols.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#SocketClient()">SocketClient</A></B>()</CODE>
<BR>
Default constructor for SocketClient.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()">_connectAction_</A></B>()</CODE>
<BR>
Because there are so many connect() methods, the _connectAction_()
method is provided as a means of performing some action immediately
after establishing a connection, rather than reimplementing all
of the connect() methods.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress)">connect</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> host)</CODE>
<BR>
Opens a Socket connected to a remote host at the current default port
and originating from the current host at a system assigned port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)">connect</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> host,
int port)</CODE>
<BR>
Opens a Socket connected to a remote host at the specified port and
originating from the current host at a system assigned port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int, java.net.InetAddress, int)">connect</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> host,
int port,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> localAddr,
int localPort)</CODE>
<BR>
Opens a Socket connected to a remote host at the specified port and
originating from the specified local address and port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.lang.String)">connect</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> hostname)</CODE>
<BR>
Opens a Socket connected to a remote host at the current default
port and originating from the current host at a system assigned port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.lang.String, int)">connect</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> hostname,
int port)</CODE>
<BR>
Opens a Socket connected to a remote host at the specified port and
originating from the current host at a system assigned port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.lang.String, int, java.net.InetAddress, int)">connect</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> hostname,
int port,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> localAddr,
int localPort)</CODE>
<BR>
Opens a Socket connected to a remote host at the specified port and
originating from the specified local address and port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#disconnect()">disconnect</A></B>()</CODE>
<BR>
Disconnects the socket connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getConnectTimeout()">getConnectTimeout</A></B>()</CODE>
<BR>
Get the underlying socket connection timeout.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getDefaultPort()">getDefaultPort</A></B>()</CODE>
<BR>
Returns the current value of the default port (stored in
<A HREF="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_"><CODE>_defaultPort_ </CODE></A>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getDefaultTimeout()">getDefaultTimeout</A></B>()</CODE>
<BR>
Returns the default timeout in milliseconds that is used when
opening a socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getKeepAlive()">getKeepAlive</A></B>()</CODE>
<BR>
Returns the current value of the SO_KEEPALIVE flag on the currently opened socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getLocalAddress()">getLocalAddress</A></B>()</CODE>
<BR>
Returns the local address to which the client's socket is bound.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getLocalPort()">getLocalPort</A></B>()</CODE>
<BR>
Returns the port number of the open socket on the local host used
for the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getRemoteAddress()">getRemoteAddress</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getRemotePort()">getRemotePort</A></B>()</CODE>
<BR>
Returns the port number of the remote host to which the client is
connected.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getServerSocketFactory()">getServerSocketFactory</A></B>()</CODE>
<BR>
Get the underlying <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net"><CODE>ServerSocketFactory</CODE></A></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getSoLinger()">getSoLinger</A></B>()</CODE>
<BR>
Returns the current SO_LINGER timeout of the currently opened socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getSoTimeout()">getSoTimeout</A></B>()</CODE>
<BR>
Returns the timeout in milliseconds of the currently opened socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#getTcpNoDelay()">getTcpNoDelay</A></B>()</CODE>
<BR>
Returns true if Nagle's algorithm is enabled on the currently opened
socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#isConnected()">isConnected</A></B>()</CODE>
<BR>
Returns true if the client is currently connected to a server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setConnectTimeout(int)">setConnectTimeout</A></B>(int connectTimeout)</CODE>
<BR>
Sets the connection timeout in milliseconds, which will be passed to the <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/Socket.html?is-external=true" title="class or interface in java.net"><CODE>Socket</CODE></A> object's
connect() method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setDefaultPort(int)">setDefaultPort</A></B>(int port)</CODE>
<BR>
Sets the default port the SocketClient should connect to when a port
is not specified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setDefaultTimeout(int)">setDefaultTimeout</A></B>(int timeout)</CODE>
<BR>
Set the default timeout in milliseconds to use when opening a socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setKeepAlive(boolean)">setKeepAlive</A></B>(boolean keepAlive)</CODE>
<BR>
Sets the SO_KEEPALIVE flag on the currently opened socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setReceiveBufferSize(int)">setReceiveBufferSize</A></B>(int size)</CODE>
<BR>
Sets the underlying socket receive buffer size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setSendBufferSize(int)">setSendBufferSize</A></B>(int size)</CODE>
<BR>
Set the underlying socket send buffer size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setServerSocketFactory(javax.net.ServerSocketFactory)">setServerSocketFactory</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</A> factory)</CODE>
<BR>
Sets the ServerSocketFactory used by the SocketClient to open ServerSocket
connections.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setSocketFactory(javax.net.SocketFactory)">setSocketFactory</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</A> factory)</CODE>
<BR>
Sets the SocketFactory used by the SocketClient to open socket
connections.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setSoLinger(boolean, int)">setSoLinger</A></B>(boolean on,
int val)</CODE>
<BR>
Sets the SO_LINGER timeout on the currently opened socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setSoTimeout(int)">setSoTimeout</A></B>(int timeout)</CODE>
<BR>
Set the timeout in milliseconds of a currently open connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#setTcpNoDelay(boolean)">setTcpNoDelay</A></B>(boolean on)</CODE>
<BR>
Enables or disables the Nagle's algorithm (TCP_NODELAY) on the
currently opened socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/net/SocketClient.html#verifyRemote(java.net.Socket)">verifyRemote</A></B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A> socket)</CODE>
<BR>
Verifies that the remote end of the given socket is connected to the
the same host that the SocketClient is currently connected to.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="NETASCII_EOL"><!-- --></A><H3>
NETASCII_EOL</H3>
<PRE>
public static final <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>NETASCII_EOL</B></PRE>
<DL>
<DD>The end of line character sequence used by most IETF protocols. That
is a carriage return followed by a newline: "\r\n"
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.commons.net.SocketClient.NETASCII_EOL">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="_timeout_"><!-- --></A><H3>
_timeout_</H3>
<PRE>
protected int <B>_timeout_</B></PRE>
<DL>
<DD>The timeout to use after opening a socket.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_socket_"><!-- --></A><H3>
_socket_</H3>
<PRE>
protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A> <B>_socket_</B></PRE>
<DL>
<DD>The socket used for the connection.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_defaultPort_"><!-- --></A><H3>
_defaultPort_</H3>
<PRE>
protected int <B>_defaultPort_</B></PRE>
<DL>
<DD>The default port the client should connect to.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_input_"><!-- --></A><H3>
_input_</H3>
<PRE>
protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> <B>_input_</B></PRE>
<DL>
<DD>The socket's InputStream.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_output_"><!-- --></A><H3>
_output_</H3>
<PRE>
protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A> <B>_output_</B></PRE>
<DL>
<DD>The socket's OutputStream.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_socketFactory_"><!-- --></A><H3>
_socketFactory_</H3>
<PRE>
protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</A> <B>_socketFactory_</B></PRE>
<DL>
<DD>The socket's SocketFactory.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="_serverSocketFactory_"><!-- --></A><H3>
_serverSocketFactory_</H3>
<PRE>
protected <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</A> <B>_serverSocketFactory_</B></PRE>
<DL>
<DD>The socket's ServerSocket Factory.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="connectTimeout"><!-- --></A><H3>
connectTimeout</H3>
<PRE>
protected int <B>connectTimeout</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="SocketClient()"><!-- --></A><H3>
SocketClient</H3>
<PRE>
public <B>SocketClient</B>()</PRE>
<DL>
<DD>Default constructor for SocketClient. Initializes
_socket_ to null, _timeout_ to 0, _defaultPort to 0,
_isConnected_ to false, and _socketFactory_ to a shared instance of
<A HREF="../../../../org/apache/commons/net/DefaultSocketFactory.html" title="class in org.apache.commons.net"><CODE>DefaultSocketFactory</CODE></A>.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="_connectAction_()"><!-- --></A><H3>
_connectAction_</H3>
<PRE>
protected void <B>_connectAction_</B>()
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Because there are so many connect() methods, the _connectAction_()
method is provided as a means of performing some action immediately
after establishing a connection, rather than reimplementing all
of the connect() methods. The last action performed by every
connect() method after opening a socket is to call this method.
<p>
This method sets the timeout on the just opened socket to the default
timeout set by <A HREF="../../../../org/apache/commons/net/SocketClient.html#setDefaultTimeout(int)"><CODE>setDefaultTimeout() </CODE></A>,
sets _input_ and _output_ to the socket's InputStream and OutputStream
respectively, and sets _isConnected_ to true.
<p>
Subclasses overriding this method should start by calling
<code> super._connectAction_() </code> first to ensure the
initialization of the aforementioned protected variables.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="connect(java.net.InetAddress, int)"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> host,
int port)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A>,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a Socket connected to a remote host at the specified port and
originating from the current host at a system assigned port.
Before returning, <A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><CODE>_connectAction_() </CODE></A>
is called to perform connection initialization actions.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - The remote host.<DD><CODE>port</CODE> - The port to connect to on the remote host.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the socket timeout could not be set.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.</DL>
</DD>
</DL>
<HR>
<A NAME="connect(java.lang.String, int)"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> hostname,
int port)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A>,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a Socket connected to a remote host at the specified port and
originating from the current host at a system assigned port.
Before returning, <A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><CODE>_connectAction_() </CODE></A>
is called to perform connection initialization actions.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hostname</CODE> - The name of the remote host.<DD><CODE>port</CODE> - The port to connect to on the remote host.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the socket timeout could not be set.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</A></CODE> - If the hostname cannot be resolved.</DL>
</DD>
</DL>
<HR>
<A NAME="connect(java.net.InetAddress, int, java.net.InetAddress, int)"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> host,
int port,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> localAddr,
int localPort)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A>,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a Socket connected to a remote host at the specified port and
originating from the specified local address and port.
Before returning, <A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><CODE>_connectAction_() </CODE></A>
is called to perform connection initialization actions.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - The remote host.<DD><CODE>port</CODE> - The port to connect to on the remote host.<DD><CODE>localAddr</CODE> - The local address to use.<DD><CODE>localPort</CODE> - The local port to use.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the socket timeout could not be set.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.</DL>
</DD>
</DL>
<HR>
<A NAME="connect(java.lang.String, int, java.net.InetAddress, int)"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> hostname,
int port,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> localAddr,
int localPort)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A>,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a Socket connected to a remote host at the specified port and
originating from the specified local address and port.
Before returning, <A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><CODE>_connectAction_() </CODE></A>
is called to perform connection initialization actions.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hostname</CODE> - The name of the remote host.<DD><CODE>port</CODE> - The port to connect to on the remote host.<DD><CODE>localAddr</CODE> - The local address to use.<DD><CODE>localPort</CODE> - The local port to use.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the socket timeout could not be set.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</A></CODE> - If the hostname cannot be resolved.</DL>
</DD>
</DL>
<HR>
<A NAME="connect(java.net.InetAddress)"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> host)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A>,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a Socket connected to a remote host at the current default port
and originating from the current host at a system assigned port.
Before returning, <A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><CODE>_connectAction_() </CODE></A>
is called to perform connection initialization actions.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - The remote host.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the socket timeout could not be set.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.</DL>
</DD>
</DL>
<HR>
<A NAME="connect(java.lang.String)"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> hostname)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A>,
<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Opens a Socket connected to a remote host at the current default
port and originating from the current host at a system assigned port.
Before returning, <A HREF="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><CODE>_connectAction_() </CODE></A>
is called to perform connection initialization actions.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hostname</CODE> - The name of the remote host.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the socket timeout could not be set.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If the socket could not be opened. In most
cases you will only want to catch IOException since SocketException is
derived from it.
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</A></CODE> - If the hostname cannot be resolved.</DL>
</DD>
</DL>
<HR>
<A NAME="disconnect()"><!-- --></A><H3>
disconnect</H3>
<PRE>
public void <B>disconnect</B>()
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Disconnects the socket connection.
You should call this method after you've finished using the class
instance and also before you call
<A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)"><CODE>connect() </CODE></A>
again. _isConnected_ is set to false, _socket_ is set to null,
_input_ is set to null, and _output_ is set to null.
<p>
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> - If there is an error closing the socket.</DL>
</DD>
</DL>
<HR>
<A NAME="isConnected()"><!-- --></A><H3>
isConnected</H3>
<PRE>
public boolean <B>isConnected</B>()</PRE>
<DL>
<DD>Returns true if the client is currently connected to a server.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True if the client is currently connected to a server,
false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="setDefaultPort(int)"><!-- --></A><H3>
setDefaultPort</H3>
<PRE>
public void <B>setDefaultPort</B>(int port)</PRE>
<DL>
<DD>Sets the default port the SocketClient should connect to when a port
is not specified. The <A HREF="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_"><CODE>_defaultPort_ </CODE></A>
variable stores this value. If never set, the default port is equal
to zero.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>port</CODE> - The default port to set.</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultPort()"><!-- --></A><H3>
getDefaultPort</H3>
<PRE>
public int <B>getDefaultPort</B>()</PRE>
<DL>
<DD>Returns the current value of the default port (stored in
<A HREF="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_"><CODE>_defaultPort_ </CODE></A>).
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The current value of the default port.</DL>
</DD>
</DL>
<HR>
<A NAME="setDefaultTimeout(int)"><!-- --></A><H3>
setDefaultTimeout</H3>
<PRE>
public void <B>setDefaultTimeout</B>(int timeout)</PRE>
<DL>
<DD>Set the default timeout in milliseconds to use when opening a socket.
This value is only used previous to a call to
<A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)"><CODE>connect()</CODE></A>
and should not be confused with <A HREF="../../../../org/apache/commons/net/SocketClient.html#setSoTimeout(int)"><CODE>setSoTimeout()</CODE></A>
which operates on an the currently opened socket. _timeout_ contains
the new timeout value.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - The timeout in milliseconds to use for the socket
connection.</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultTimeout()"><!-- --></A><H3>
getDefaultTimeout</H3>
<PRE>
public int <B>getDefaultTimeout</B>()</PRE>
<DL>
<DD>Returns the default timeout in milliseconds that is used when
opening a socket.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The default timeout in milliseconds that is used when
opening a socket.</DL>
</DD>
</DL>
<HR>
<A NAME="setSoTimeout(int)"><!-- --></A><H3>
setSoTimeout</H3>
<PRE>
public void <B>setSoTimeout</B>(int timeout)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Set the timeout in milliseconds of a currently open connection.
Only call this method after a connection has been opened
by <A HREF="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)"><CODE>connect()</CODE></A>.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - The timeout in milliseconds to use for the currently
open socket connection.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the operation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="setSendBufferSize(int)"><!-- --></A><H3>
setSendBufferSize</H3>
<PRE>
public void <B>setSendBufferSize</B>(int size)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Set the underlying socket send buffer size.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - The size of the buffer in bytes.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE><DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setReceiveBufferSize(int)"><!-- --></A><H3>
setReceiveBufferSize</H3>
<PRE>
public void <B>setReceiveBufferSize</B>(int size)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Sets the underlying socket receive buffer size.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - The size of the buffer in bytes.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE><DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSoTimeout()"><!-- --></A><H3>
getSoTimeout</H3>
<PRE>
public int <B>getSoTimeout</B>()
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Returns the timeout in milliseconds of the currently opened socket.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The timeout in milliseconds of the currently opened socket.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the operation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="setTcpNoDelay(boolean)"><!-- --></A><H3>
setTcpNoDelay</H3>
<PRE>
public void <B>setTcpNoDelay</B>(boolean on)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Enables or disables the Nagle's algorithm (TCP_NODELAY) on the
currently opened socket.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>on</CODE> - True if Nagle's algorithm is to be enabled, false if not.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the operation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="getTcpNoDelay()"><!-- --></A><H3>
getTcpNoDelay</H3>
<PRE>
public boolean <B>getTcpNoDelay</B>()
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Returns true if Nagle's algorithm is enabled on the currently opened
socket.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True if Nagle's algorithm is enabled on the currently opened
socket, false otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the operation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="setKeepAlive(boolean)"><!-- --></A><H3>
setKeepAlive</H3>
<PRE>
public void <B>setKeepAlive</B>(boolean keepAlive)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Sets the SO_KEEPALIVE flag on the currently opened socket.
From the Javadocs, the default keepalive time is 2 hours (although this is
implementation dependent). It looks as though the Windows WSA sockets implementation
allows a specific keepalive value to be set, although this seems not to be the case on
other systems.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keepAlive</CODE> - If true, keepAlive is turned on
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE><DT><B>Since:</B></DT>
<DD>2.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getKeepAlive()"><!-- --></A><H3>
getKeepAlive</H3>
<PRE>
public boolean <B>getKeepAlive</B>()
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Returns the current value of the SO_KEEPALIVE flag on the currently opened socket.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True if SO_KEEPALIVE is enabled.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE><DT><B>Since:</B></DT>
<DD>2.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSoLinger(boolean, int)"><!-- --></A><H3>
setSoLinger</H3>
<PRE>
public void <B>setSoLinger</B>(boolean on,
int val)
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Sets the SO_LINGER timeout on the currently opened socket.
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>on</CODE> - True if linger is to be enabled, false if not.<DD><CODE>val</CODE> - The linger timeout (in hundredths of a second?)
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the operation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="getSoLinger()"><!-- --></A><H3>
getSoLinger</H3>
<PRE>
public int <B>getSoLinger</B>()
throws <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Returns the current SO_LINGER timeout of the currently opened socket.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The current SO_LINGER timeout. If SO_LINGER is disabled returns
-1.
<DT><B>Throws:</B>
<DD><CODE><A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</A></CODE> - If the operation fails.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalPort()"><!-- --></A><H3>
getLocalPort</H3>
<PRE>
public int <B>getLocalPort</B>()</PRE>
<DL>
<DD>Returns the port number of the open socket on the local host used
for the connection.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The port number of the open socket on the local host used
for the connection.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalAddress()"><!-- --></A><H3>
getLocalAddress</H3>
<PRE>
public <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> <B>getLocalAddress</B>()</PRE>
<DL>
<DD>Returns the local address to which the client's socket is bound.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The local address to which the client's socket is bound.</DL>
</DD>
</DL>
<HR>
<A NAME="getRemotePort()"><!-- --></A><H3>
getRemotePort</H3>
<PRE>
public int <B>getRemotePort</B>()</PRE>
<DL>
<DD>Returns the port number of the remote host to which the client is
connected.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The port number of the remote host to which the client is
connected.</DL>
</DD>
</DL>
<HR>
<A NAME="getRemoteAddress()"><!-- --></A><H3>
getRemoteAddress</H3>
<PRE>
public <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</A> <B>getRemoteAddress</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>The remote address to which the client is connected.</DL>
</DD>
</DL>
<HR>
<A NAME="verifyRemote(java.net.Socket)"><!-- --></A><H3>
verifyRemote</H3>
<PRE>
public boolean <B>verifyRemote</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A> socket)</PRE>
<DL>
<DD>Verifies that the remote end of the given socket is connected to the
the same host that the SocketClient is currently connected to. This
is useful for doing a quick security check when a client needs to
accept a connection from a server, such as an FTP data connection or
a BSD R command standard error stream.
<p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>True if the remote hosts are the same, false if not.</DL>
</DD>
</DL>
<HR>
<A NAME="setSocketFactory(javax.net.SocketFactory)"><!-- --></A><H3>
setSocketFactory</H3>
<PRE>
public void <B>setSocketFactory</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</A> factory)</PRE>
<DL>
<DD>Sets the SocketFactory used by the SocketClient to open socket
connections. If the factory value is null, then a default
factory is used (only do this to reset the factory after having
previously altered it).
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>factory</CODE> - The new SocketFactory the SocketClient should use.</DL>
</DD>
</DL>
<HR>
<A NAME="setServerSocketFactory(javax.net.ServerSocketFactory)"><!-- --></A><H3>
setServerSocketFactory</H3>
<PRE>
public void <B>setServerSocketFactory</B>(<A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</A> factory)</PRE>
<DL>
<DD>Sets the ServerSocketFactory used by the SocketClient to open ServerSocket
connections. If the factory value is null, then a default
factory is used (only do this to reset the factory after having
previously altered it).
<p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>factory</CODE> - The new ServerSocketFactory the SocketClient should use.<DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setConnectTimeout(int)"><!-- --></A><H3>
setConnectTimeout</H3>
<PRE>
public void <B>setConnectTimeout</B>(int connectTimeout)</PRE>
<DL>
<DD>Sets the connection timeout in milliseconds, which will be passed to the <A HREF="file:///usr/share/doc/default-jdk-doc/api/java/net/Socket.html?is-external=true" title="class or interface in java.net"><CODE>Socket</CODE></A> object's
connect() method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>connectTimeout</CODE> - The connection timeout to use (in ms)<DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getConnectTimeout()"><!-- --></A><H3>
getConnectTimeout</H3>
<PRE>
public int <B>getConnectTimeout</B>()</PRE>
<DL>
<DD>Get the underlying socket connection timeout.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>timeout (in ms)<DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getServerSocketFactory()"><!-- --></A><H3>
getServerSocketFactory</H3>
<PRE>
public <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</A> <B>getServerSocketFactory</B>()</PRE>
<DL>
<DD>Get the underlying <A HREF="file:///usr/share/doc/default-jdk-doc/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net"><CODE>ServerSocketFactory</CODE></A>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The server socket factory<DT><B>Since:</B></DT>
<DD>2.2</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/net/ProtocolCommandSupport.html" title="class in org.apache.commons.net"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/commons/net/SocketClient.html" target="_top"><B>FRAMES</B></A>
<A HREF="SocketClient.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|