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 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696
|
<!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.4.2_19) on Wed Dec 30 16:45:48 CET 2009 -->
<TITLE>
SharedSocket (jTDS API)
</TITLE>
<META NAME="keywords" CONTENT="net.sourceforge.jtds.jdbc.SharedSocket class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="SharedSocket (jTDS API)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= 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=3 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="class-use/SharedSocket.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../net/sourceforge/jtds/jdbc/SharedNamedPipe.html" title="class in net.sourceforge.jtds.jdbc"><B>PREV CLASS</B></A>
<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="SharedSocket.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: <A HREF="#nested_class_summary">NESTED</A> | <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">
net.sourceforge.jtds.jdbc</FONT>
<BR>
Class SharedSocket</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>net.sourceforge.jtds.jdbc.SharedSocket</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedLocalNamedPipe.html" title="class in net.sourceforge.jtds.jdbc">SharedLocalNamedPipe</A>, <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedNamedPipe.html" title="class in net.sourceforge.jtds.jdbc">SharedNamedPipe</A></DD>
</DL>
<HR>
<DL>
<DT> class <B>SharedSocket</B><DT>extends java.lang.Object</DL>
<P>
This class mananges the physical connection to the SQL Server and
serialises its use amongst a number of virtual sockets.
This allows one physical connection to service a number of concurrent
statements.
<p>
Constraints and assumptions:
<ol>
<li>Callers will not attempt to read from the server without issuing a request first.
<li>The end of a server reply can be identified as byte 2 of the header is non zero.
</ol>
</p>
Comments:
<ol>
<li>This code will discard unread server data if a new request is issued.
Currently the higher levels of the driver attempt to do this but may be
we can just rely on this code instead.
<li>A cancel can be issued by a caller only if the server is currently sending
data for the caller otherwise the cancel is ignored.
<li>Cancel packets on their own are returned as extra records appended to the
previous packet so that the TdsCore module can process them.
</ol>
This version of the class will start to cache results to disk once a predetermined
maximum buffer memory threshold has been passed. Small result sets that will fit
within a specified limit (default 8 packets) will continue to be held in memory
(even if the memory threshold has been passed) in the interests of efficiency.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: SharedSocket.java,v 1.39.2.4 2009/12/30 14:37:00 ickzon Exp $</DD>
<DT><B>Author:</B></DT>
<DD>Mike Hutchinson.</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A></B></CODE>
<BR>
This inner class contains the state information for the virtual socket.</TD>
</TR>
</TABLE>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#bufferDir">bufferDir</A></B></CODE>
<BR>
The directory to buffer data to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancelMonitor">cancelMonitor</A></B></CODE>
<BR>
Synchronization monitor for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancelPending"><CODE>cancelPending</CODE></A> and
<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#responseOwner"><CODE>responseOwner</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancelPending">cancelPending</A></B></CODE>
<BR>
A cancel packet is pending.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private <A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html" title="class in net.sourceforge.jtds.jdbc">CharsetInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#charsetInfo">charsetInfo</A></B></CODE>
<BR>
The character set to use for converting strings to/from bytes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#doneBuffer">doneBuffer</A></B></CODE>
<BR>
Buffer for TDS_DONE packets</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#globalMemUsage">globalMemUsage</A></B></CODE>
<BR>
Total memory usage in all instances of the driver
NB. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#hdrBuf">hdrBuf</A></B></CODE>
<BR>
Buffer for packet header.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#host">host</A></B></CODE>
<BR>
The server host name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.io.DataInputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in">in</A></B></CODE>
<BR>
Input stream for network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#maxBufSize">maxBufSize</A></B></CODE>
<BR>
Current maxium input buffer size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#memoryBudget">memoryBudget</A></B></CODE>
<BR>
Max memory limit to use for buffers.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#minMemPkts">minMemPkts</A></B></CODE>
<BR>
Minimum number of packets that will be cached in memory
before the driver tries to write to disk even if
memoryBudget has been exceeded.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.io.DataOutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out">out</A></B></CODE>
<BR>
Output stream for network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#packetCount">packetCount</A></B></CODE>
<BR>
Count of packets received.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#peakMemUsage">peakMemUsage</A></B></CODE>
<BR>
Peak memory usage for debug purposes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#port">port</A></B></CODE>
<BR>
The server port number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#responseOwner">responseOwner</A></B></CODE>
<BR>
The Stream ID of the object that is expecting a response from the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#securityViolation">securityViolation</A></B></CODE>
<BR>
Global flag to indicate that security constraints mean
that attempts to create work files will fail.</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#serverType">serverType</A></B></CODE>
<BR>
The servertype one of Driver.SQLSERVER or Driver.SYBASE</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.net.Socket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#socket">socket</A></B></CODE>
<BR>
The shared network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.util.ArrayList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#socketTable">socketTable</A></B></CODE>
<BR>
Table of stream objects sharing this socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.net.Socket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#sslSocket">sslSocket</A></B></CODE>
<BR>
The shared SSL network socket;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#TDS_DONE_LEN">TDS_DONE_LEN</A></B></CODE>
<BR>
Length of a TDS_DONE token.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#TDS_DONE_TOKEN">TDS_DONE_TOKEN</A></B></CODE>
<BR>
TDS done token.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#TDS_HDR_LEN">TDS_HDR_LEN</A></B></CODE>
<BR>
Length of TDS packet header.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#tdsVersion">tdsVersion</A></B></CODE>
<BR>
Tds protocol version</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">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private)</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#SharedSocket(net.sourceforge.jtds.jdbc.ConnectionJDBC2)">SharedSocket</A></B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/ConnectionJDBC2.html" title="class in net.sourceforge.jtds.jdbc">ConnectionJDBC2</A> connection)</CODE>
<BR>
Construct a <code>SharedSocket</code> object specifying host name and
port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#SharedSocket(java.io.File, int, int)">SharedSocket</A></B>(java.io.File bufferDir,
int tdsVersion,
int serverType)</CODE>
<BR>
</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">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancel(int)">cancel</A></B>(int streamId)</CODE>
<BR>
Send a TDS cancel packet to the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#close()">close</A></B>()</CODE>
<BR>
Close the socket and release all resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#closeStream(int)">closeStream</A></B>(int streamId)</CODE>
<BR>
Deallocate a stream linked to this socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private java.net.Socket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#createSocketForJDBC3(net.sourceforge.jtds.jdbc.ConnectionJDBC2)">createSocketForJDBC3</A></B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/ConnectionJDBC2.html" title="class in net.sourceforge.jtds.jdbc">ConnectionJDBC2</A> connection)</CODE>
<BR>
Creates a <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc"><CODE>SharedSocket.VirtualSocket</CODE></A> through reflection when <A HREF="../../../../net/sourceforge/jtds/jdbc/Driver.html#JDBC3"><CODE>Driver.JDBC3</CODE></A>
is <code>true</code>. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#dequeueInput(net.sourceforge.jtds.jdbc.SharedSocket.VirtualSocket)">dequeueInput</A></B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A> vsock)</CODE>
<BR>
Read a cached packet from the in memory queue or from a disk based queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#disableEncryption()">disableEncryption</A></B>()</CODE>
<BR>
Disable TLS encryption and switch back to raw TCP/IP socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#enableEncryption(java.lang.String)">enableEncryption</A></B>(java.lang.String ssl)</CODE>
<BR>
Enable TLS encryption by creating a TLS socket over the
existing TCP/IP network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#enqueueInput(net.sourceforge.jtds.jdbc.SharedSocket.VirtualSocket, byte[])">enqueueInput</A></B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A> vsock,
byte[] buffer)</CODE>
<BR>
Save a packet buffer in a memory queue or to a disk queue if the global
memory limit for the driver has been exceeded.</TD>
</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#finalize()">finalize</A></B>()</CODE>
<BR>
Finalize this object by releasing its resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#forceClose()">forceClose</A></B>()</CODE>
<BR>
Force close the socket causing any pending reads/writes to fail.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getCharset()">getCharset</A></B>()</CODE>
<BR>
Retrieve the character set name used to translate byte arrays to
or from Strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) <A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html" title="class in net.sourceforge.jtds.jdbc">CharsetInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getCharsetInfo()">getCharsetInfo</A></B>()</CODE>
<BR>
Retrieve the character set descriptor used to translate byte arrays to
or from Strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getHost()">getHost</A></B>()</CODE>
<BR>
Get the server host name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.io.DataInputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getIn()">getIn</A></B>()</CODE>
<BR>
Getter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in"><CODE>in</CODE></A> field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getMemoryBudget()">getMemoryBudget</A></B>()</CODE>
<BR>
Get the global buffer memory limit for all instancs of this driver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getMinMemPkts()">getMinMemPkts</A></B>()</CODE>
<BR>
Get the minimum number of memory cached packets.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getNetPacket(int, byte[])">getNetPacket</A></B>(int streamId,
byte[] buffer)</CODE>
<BR>
Get a network packet. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.io.DataOutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getOut()">getOut</A></B>()</CODE>
<BR>
Getter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out"><CODE>out</CODE></A> field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getPktLen(byte[])">getPktLen</A></B>(byte[] buf)</CODE>
<BR>
Convert two bytes (in network byte order) in a byte array into a Java
short integer.</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getPort()">getPort</A></B>()</CODE>
<BR>
Get the server port number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) <A HREF="../../../../net/sourceforge/jtds/jdbc/RequestStream.html" title="class in net.sourceforge.jtds.jdbc">RequestStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getRequestStream(int, int)">getRequestStream</A></B>(int bufferSize,
int maxPrecision)</CODE>
<BR>
Obtain an instance of a server request stream for this socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) <A HREF="../../../../net/sourceforge/jtds/jdbc/ResponseStream.html" title="class in net.sourceforge.jtds.jdbc">ResponseStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getResponseStream(net.sourceforge.jtds.jdbc.RequestStream, int)">getResponseStream</A></B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/RequestStream.html" title="class in net.sourceforge.jtds.jdbc">RequestStream</A> requestStream,
int bufferSize)</CODE>
<BR>
Obtain an instance of a server response stream for this socket.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getTdsVersion()">getTdsVersion</A></B>()</CODE>
<BR>
Retrieve the TDS version that is active on the connection
supported by this socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#isConnected()">isConnected</A></B>()</CODE>
<BR>
Get the connected status of this socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#lookup(int)">lookup</A></B>(int streamId)</CODE>
<BR>
Retrieves the virtual socket with the given id.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#readPacket(byte[])">readPacket</A></B>(byte[] buffer)</CODE>
<BR>
Read a physical TDS packet from the network.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#sendNetPacket(int, byte[])">sendNetPacket</A></B>(int streamId,
byte[] buffer)</CODE>
<BR>
Send a network packet. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setCharsetInfo(net.sourceforge.jtds.jdbc.CharsetInfo)">setCharsetInfo</A></B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html" title="class in net.sourceforge.jtds.jdbc">CharsetInfo</A> charsetInfo)</CODE>
<BR>
Set the character set descriptor to be used to translate byte arrays to
or from Strings.</TD>
</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setIn(java.io.DataInputStream)">setIn</A></B>(java.io.DataInputStream in)</CODE>
<BR>
Setter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in"><CODE>in</CODE></A> field.</TD>
</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setKeepAlive(boolean)">setKeepAlive</A></B>(boolean keepAlive)</CODE>
<BR>
Set the socket keep alive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setMemoryBudget(int)">setMemoryBudget</A></B>(int memoryBudget)</CODE>
<BR>
Set the global buffer memory limit for all instances of this driver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setMinMemPkts(int)">setMinMemPkts</A></B>(int minMemPkts)</CODE>
<BR>
Set the minimum number of packets to cache in memory before
writing to disk.</TD>
</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setOut(java.io.DataOutputStream)">setOut</A></B>(java.io.DataOutputStream out)</CODE>
<BR>
Setter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out"><CODE>out</CODE></A> field.</TD>
</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setTdsVersion(int)">setTdsVersion</A></B>(int tdsVersion)</CODE>
<BR>
Set the TDS version field.</TD>
</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="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setTimeout(int)">setTimeout</A></B>(int timeout)</CODE>
<BR>
Set the socket timeout.</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">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="socket"><!-- --></A><H3>
socket</H3>
<PRE>
private java.net.Socket <B>socket</B></PRE>
<DL>
<DD>The shared network socket.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="sslSocket"><!-- --></A><H3>
sslSocket</H3>
<PRE>
private java.net.Socket <B>sslSocket</B></PRE>
<DL>
<DD>The shared SSL network socket;
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="out"><!-- --></A><H3>
out</H3>
<PRE>
private java.io.DataOutputStream <B>out</B></PRE>
<DL>
<DD>Output stream for network socket.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="in"><!-- --></A><H3>
in</H3>
<PRE>
private java.io.DataInputStream <B>in</B></PRE>
<DL>
<DD>Input stream for network socket.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="maxBufSize"><!-- --></A><H3>
maxBufSize</H3>
<PRE>
private int <B>maxBufSize</B></PRE>
<DL>
<DD>Current maxium input buffer size.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="socketTable"><!-- --></A><H3>
socketTable</H3>
<PRE>
private final java.util.ArrayList <B>socketTable</B></PRE>
<DL>
<DD>Table of stream objects sharing this socket.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="responseOwner"><!-- --></A><H3>
responseOwner</H3>
<PRE>
private int <B>responseOwner</B></PRE>
<DL>
<DD>The Stream ID of the object that is expecting a response from the server.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="hdrBuf"><!-- --></A><H3>
hdrBuf</H3>
<PRE>
private final byte[] <B>hdrBuf</B></PRE>
<DL>
<DD>Buffer for packet header.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="bufferDir"><!-- --></A><H3>
bufferDir</H3>
<PRE>
private final java.io.File <B>bufferDir</B></PRE>
<DL>
<DD>The directory to buffer data to.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="globalMemUsage"><!-- --></A><H3>
globalMemUsage</H3>
<PRE>
private static int <B>globalMemUsage</B></PRE>
<DL>
<DD>Total memory usage in all instances of the driver
NB. Access to this field should probably be synchronized
but in practice lost updates will not matter much and I think
all VMs tend to do atomic saves to integer variables.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="peakMemUsage"><!-- --></A><H3>
peakMemUsage</H3>
<PRE>
private static int <B>peakMemUsage</B></PRE>
<DL>
<DD>Peak memory usage for debug purposes.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="memoryBudget"><!-- --></A><H3>
memoryBudget</H3>
<PRE>
private static int <B>memoryBudget</B></PRE>
<DL>
<DD>Max memory limit to use for buffers.
Only when this limit is exceeded will the driver
start caching to disk.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="minMemPkts"><!-- --></A><H3>
minMemPkts</H3>
<PRE>
private static int <B>minMemPkts</B></PRE>
<DL>
<DD>Minimum number of packets that will be cached in memory
before the driver tries to write to disk even if
memoryBudget has been exceeded.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="securityViolation"><!-- --></A><H3>
securityViolation</H3>
<PRE>
private static boolean <B>securityViolation</B></PRE>
<DL>
<DD>Global flag to indicate that security constraints mean
that attempts to create work files will fail.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="tdsVersion"><!-- --></A><H3>
tdsVersion</H3>
<PRE>
private int <B>tdsVersion</B></PRE>
<DL>
<DD>Tds protocol version
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="serverType"><!-- --></A><H3>
serverType</H3>
<PRE>
protected final int <B>serverType</B></PRE>
<DL>
<DD>The servertype one of Driver.SQLSERVER or Driver.SYBASE
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="charsetInfo"><!-- --></A><H3>
charsetInfo</H3>
<PRE>
private <A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html" title="class in net.sourceforge.jtds.jdbc">CharsetInfo</A> <B>charsetInfo</B></PRE>
<DL>
<DD>The character set to use for converting strings to/from bytes.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="packetCount"><!-- --></A><H3>
packetCount</H3>
<PRE>
private int <B>packetCount</B></PRE>
<DL>
<DD>Count of packets received.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="host"><!-- --></A><H3>
host</H3>
<PRE>
private java.lang.String <B>host</B></PRE>
<DL>
<DD>The server host name.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="port"><!-- --></A><H3>
port</H3>
<PRE>
private int <B>port</B></PRE>
<DL>
<DD>The server port number.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cancelPending"><!-- --></A><H3>
cancelPending</H3>
<PRE>
private boolean <B>cancelPending</B></PRE>
<DL>
<DD>A cancel packet is pending.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="cancelMonitor"><!-- --></A><H3>
cancelMonitor</H3>
<PRE>
private java.lang.Object <B>cancelMonitor</B></PRE>
<DL>
<DD>Synchronization monitor for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancelPending"><CODE>cancelPending</CODE></A> and
<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#responseOwner"><CODE>responseOwner</CODE></A>.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="doneBuffer"><!-- --></A><H3>
doneBuffer</H3>
<PRE>
private byte[] <B>doneBuffer</B></PRE>
<DL>
<DD>Buffer for TDS_DONE packets
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="TDS_DONE_TOKEN"><!-- --></A><H3>
TDS_DONE_TOKEN</H3>
<PRE>
private static final int <B>TDS_DONE_TOKEN</B></PRE>
<DL>
<DD>TDS done token.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.sourceforge.jtds.jdbc.SharedSocket.TDS_DONE_TOKEN">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="TDS_DONE_LEN"><!-- --></A><H3>
TDS_DONE_LEN</H3>
<PRE>
private static final int <B>TDS_DONE_LEN</B></PRE>
<DL>
<DD>Length of a TDS_DONE token.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.sourceforge.jtds.jdbc.SharedSocket.TDS_DONE_LEN">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="TDS_HDR_LEN"><!-- --></A><H3>
TDS_HDR_LEN</H3>
<PRE>
private static final int <B>TDS_HDR_LEN</B></PRE>
<DL>
<DD>Length of TDS packet header.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.sourceforge.jtds.jdbc.SharedSocket.TDS_HDR_LEN">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SharedSocket(java.io.File, int, int)"><!-- --></A><H3>
SharedSocket</H3>
<PRE>
protected <B>SharedSocket</B>(java.io.File bufferDir,
int tdsVersion,
int serverType)</PRE>
<DL>
</DL>
<HR>
<A NAME="SharedSocket(net.sourceforge.jtds.jdbc.ConnectionJDBC2)"><!-- --></A><H3>
SharedSocket</H3>
<PRE>
<B>SharedSocket</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/ConnectionJDBC2.html" title="class in net.sourceforge.jtds.jdbc">ConnectionJDBC2</A> connection)
throws java.io.IOException,
java.net.UnknownHostException</PRE>
<DL>
<DD>Construct a <code>SharedSocket</code> object specifying host name and
port.
<P>
<DT><B>Parameters:</B><DD><CODE>connection</CODE> - the connection object
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if socket open fails
<DD><CODE>java.net.UnknownHostException</CODE></DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="createSocketForJDBC3(net.sourceforge.jtds.jdbc.ConnectionJDBC2)"><!-- --></A><H3>
createSocketForJDBC3</H3>
<PRE>
private java.net.Socket <B>createSocketForJDBC3</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/ConnectionJDBC2.html" title="class in net.sourceforge.jtds.jdbc">ConnectionJDBC2</A> connection)
throws java.io.IOException</PRE>
<DL>
<DD>Creates a <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc"><CODE>SharedSocket.VirtualSocket</CODE></A> through reflection when <A HREF="../../../../net/sourceforge/jtds/jdbc/Driver.html#JDBC3"><CODE>Driver.JDBC3</CODE></A>
is <code>true</code>. Reflection must be used to stay compatible
with JDK 1.3.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>connection</CODE> - the connection object
<DT><B>Returns:</B><DD>a socket open to the host and port with the given timeout
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if socket open fails</DL>
</DD>
</DL>
<HR>
<A NAME="enableEncryption(java.lang.String)"><!-- --></A><H3>
enableEncryption</H3>
<PRE>
void <B>enableEncryption</B>(java.lang.String ssl)
throws java.io.IOException</PRE>
<DL>
<DD>Enable TLS encryption by creating a TLS socket over the
existing TCP/IP network socket.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ssl</CODE> - the SSL URL property value
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="disableEncryption()"><!-- --></A><H3>
disableEncryption</H3>
<PRE>
void <B>disableEncryption</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Disable TLS encryption and switch back to raw TCP/IP socket.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="setCharsetInfo(net.sourceforge.jtds.jdbc.CharsetInfo)"><!-- --></A><H3>
setCharsetInfo</H3>
<PRE>
void <B>setCharsetInfo</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html" title="class in net.sourceforge.jtds.jdbc">CharsetInfo</A> charsetInfo)</PRE>
<DL>
<DD>Set the character set descriptor to be used to translate byte arrays to
or from Strings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>charsetInfo</CODE> - the character set descriptor</DL>
</DD>
</DL>
<HR>
<A NAME="getCharsetInfo()"><!-- --></A><H3>
getCharsetInfo</H3>
<PRE>
<A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html" title="class in net.sourceforge.jtds.jdbc">CharsetInfo</A> <B>getCharsetInfo</B>()</PRE>
<DL>
<DD>Retrieve the character set descriptor used to translate byte arrays to
or from Strings.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCharset()"><!-- --></A><H3>
getCharset</H3>
<PRE>
java.lang.String <B>getCharset</B>()</PRE>
<DL>
<DD>Retrieve the character set name used to translate byte arrays to
or from Strings.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the character set name as a <code>String</code></DL>
</DD>
</DL>
<HR>
<A NAME="getRequestStream(int, int)"><!-- --></A><H3>
getRequestStream</H3>
<PRE>
<A HREF="../../../../net/sourceforge/jtds/jdbc/RequestStream.html" title="class in net.sourceforge.jtds.jdbc">RequestStream</A> <B>getRequestStream</B>(int bufferSize,
int maxPrecision)</PRE>
<DL>
<DD>Obtain an instance of a server request stream for this socket.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - the initial buffer size to be used by the
<code>RequestStream</code><DD><CODE>maxPrecision</CODE> - the maximum precision for numeric/decimal types
<DT><B>Returns:</B><DD>the server request stream as a <code>RequestStream</code></DL>
</DD>
</DL>
<HR>
<A NAME="getResponseStream(net.sourceforge.jtds.jdbc.RequestStream, int)"><!-- --></A><H3>
getResponseStream</H3>
<PRE>
<A HREF="../../../../net/sourceforge/jtds/jdbc/ResponseStream.html" title="class in net.sourceforge.jtds.jdbc">ResponseStream</A> <B>getResponseStream</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/RequestStream.html" title="class in net.sourceforge.jtds.jdbc">RequestStream</A> requestStream,
int bufferSize)</PRE>
<DL>
<DD>Obtain an instance of a server response stream for this socket.
NB. getRequestStream() must be used first to obtain the RequestStream
needed as a parameter for this method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>requestStream</CODE> - an existing server request stream object obtained
from this <code>SharedSocket</code><DD><CODE>bufferSize</CODE> - the initial buffer size to be used by the
<code>RequestStream</code>
<DT><B>Returns:</B><DD>the server response stream as a <code>ResponseStream</code></DL>
</DD>
</DL>
<HR>
<A NAME="getTdsVersion()"><!-- --></A><H3>
getTdsVersion</H3>
<PRE>
int <B>getTdsVersion</B>()</PRE>
<DL>
<DD>Retrieve the TDS version that is active on the connection
supported by this socket.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the TDS version as an <code>int</code></DL>
</DD>
</DL>
<HR>
<A NAME="setTdsVersion(int)"><!-- --></A><H3>
setTdsVersion</H3>
<PRE>
protected void <B>setTdsVersion</B>(int tdsVersion)</PRE>
<DL>
<DD>Set the TDS version field.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tdsVersion</CODE> - the TDS version as an <code>int</code></DL>
</DD>
</DL>
<HR>
<A NAME="setMemoryBudget(int)"><!-- --></A><H3>
setMemoryBudget</H3>
<PRE>
static void <B>setMemoryBudget</B>(int memoryBudget)</PRE>
<DL>
<DD>Set the global buffer memory limit for all instances of this driver.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>memoryBudget</CODE> - the global memory budget</DL>
</DD>
</DL>
<HR>
<A NAME="getMemoryBudget()"><!-- --></A><H3>
getMemoryBudget</H3>
<PRE>
static int <B>getMemoryBudget</B>()</PRE>
<DL>
<DD>Get the global buffer memory limit for all instancs of this driver.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the memory limit as an <code>int</code></DL>
</DD>
</DL>
<HR>
<A NAME="setMinMemPkts(int)"><!-- --></A><H3>
setMinMemPkts</H3>
<PRE>
static void <B>setMinMemPkts</B>(int minMemPkts)</PRE>
<DL>
<DD>Set the minimum number of packets to cache in memory before
writing to disk.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>minMemPkts</CODE> - the minimum number of packets to cache</DL>
</DD>
</DL>
<HR>
<A NAME="getMinMemPkts()"><!-- --></A><H3>
getMinMemPkts</H3>
<PRE>
static int <B>getMinMemPkts</B>()</PRE>
<DL>
<DD>Get the minimum number of memory cached packets.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>minimum memory packets as an <code>int</code></DL>
</DD>
</DL>
<HR>
<A NAME="isConnected()"><!-- --></A><H3>
isConnected</H3>
<PRE>
boolean <B>isConnected</B>()</PRE>
<DL>
<DD>Get the connected status of this socket.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the underlying socket is connected</DL>
</DD>
</DL>
<HR>
<A NAME="cancel(int)"><!-- --></A><H3>
cancel</H3>
<PRE>
boolean <B>cancel</B>(int streamId)</PRE>
<DL>
<DD>Send a TDS cancel packet to the server.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>streamId</CODE> - the <code>RequestStream</code> id
<DT><B>Returns:</B><DD><code>boolean</code> true if a cancel is actually
issued by this method call.</DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
void <B>close</B>()
throws java.io.IOException</PRE>
<DL>
<DD>Close the socket and release all resources.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if the socket close fails</DL>
</DD>
</DL>
<HR>
<A NAME="forceClose()"><!-- --></A><H3>
forceClose</H3>
<PRE>
void <B>forceClose</B>()</PRE>
<DL>
<DD>Force close the socket causing any pending reads/writes to fail.
<p>
Used by the login timer to abort a login attempt.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="closeStream(int)"><!-- --></A><H3>
closeStream</H3>
<PRE>
void <B>closeStream</B>(int streamId)</PRE>
<DL>
<DD>Deallocate a stream linked to this socket.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>streamId</CODE> - the <code>ResponseStream</code> id</DL>
</DD>
</DL>
<HR>
<A NAME="sendNetPacket(int, byte[])"><!-- --></A><H3>
sendNetPacket</H3>
<PRE>
byte[] <B>sendNetPacket</B>(int streamId,
byte[] buffer)
throws java.io.IOException</PRE>
<DL>
<DD>Send a network packet. If output for another virtual socket is
in progress this packet will be sent later.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>streamId</CODE> - the originating <code>RequestStream</code> object<DD><CODE>buffer</CODE> - the data to send
<DT><B>Returns:</B><DD>the same buffer received if emptied or another buffer w/ the
same size if the incoming buffer is cached (to avoid copying)
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="getNetPacket(int, byte[])"><!-- --></A><H3>
getNetPacket</H3>
<PRE>
byte[] <B>getNetPacket</B>(int streamId,
byte[] buffer)
throws java.io.IOException</PRE>
<DL>
<DD>Get a network packet. This may be read from the network directly or from
previously cached buffers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>streamId</CODE> - the originating ResponseStream object<DD><CODE>buffer</CODE> - the data buffer to receive the object (may be replaced)
<DT><B>Returns:</B><DD>the data in a <code>byte[]</code> buffer
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if an I/O error occurs</DL>
</DD>
</DL>
<HR>
<A NAME="enqueueInput(net.sourceforge.jtds.jdbc.SharedSocket.VirtualSocket, byte[])"><!-- --></A><H3>
enqueueInput</H3>
<PRE>
private void <B>enqueueInput</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A> vsock,
byte[] buffer)
throws java.io.IOException</PRE>
<DL>
<DD>Save a packet buffer in a memory queue or to a disk queue if the global
memory limit for the driver has been exceeded.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>vsock</CODE> - the virtual socket owning this data<DD><CODE>buffer</CODE> - the data to queue
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="dequeueInput(net.sourceforge.jtds.jdbc.SharedSocket.VirtualSocket)"><!-- --></A><H3>
dequeueInput</H3>
<PRE>
private byte[] <B>dequeueInput</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A> vsock)
throws java.io.IOException</PRE>
<DL>
<DD>Read a cached packet from the in memory queue or from a disk based queue.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>vsock</CODE> - the virtual socket owning this data
<DT><B>Returns:</B><DD>a buffer containing the packet
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="readPacket(byte[])"><!-- --></A><H3>
readPacket</H3>
<PRE>
private byte[] <B>readPacket</B>(byte[] buffer)
throws java.io.IOException</PRE>
<DL>
<DD>Read a physical TDS packet from the network.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - a buffer to read the data into (if it fits) or null
<DT><B>Returns:</B><DD>either the incoming buffer if it was large enough or a newly
allocated buffer with the read packet
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="lookup(int)"><!-- --></A><H3>
lookup</H3>
<PRE>
private <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc">SharedSocket.VirtualSocket</A> <B>lookup</B>(int streamId)</PRE>
<DL>
<DD>Retrieves the virtual socket with the given id.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>streamId</CODE> - id of the virtual socket to retrieve</DL>
</DD>
</DL>
<HR>
<A NAME="getPktLen(byte[])"><!-- --></A><H3>
getPktLen</H3>
<PRE>
static int <B>getPktLen</B>(byte[] buf)</PRE>
<DL>
<DD>Convert two bytes (in network byte order) in a byte array into a Java
short integer.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>buf</CODE> - array of data
<DT><B>Returns:</B><DD>the 16 bit unsigned value as an <code>int</code></DL>
</DD>
</DL>
<HR>
<A NAME="setTimeout(int)"><!-- --></A><H3>
setTimeout</H3>
<PRE>
protected void <B>setTimeout</B>(int timeout)
throws java.net.SocketException</PRE>
<DL>
<DD>Set the socket timeout.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value in milliseconds
<DT><B>Throws:</B>
<DD><CODE>java.net.SocketException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setKeepAlive(boolean)"><!-- --></A><H3>
setKeepAlive</H3>
<PRE>
protected void <B>setKeepAlive</B>(boolean keepAlive)
throws java.net.SocketException</PRE>
<DL>
<DD>Set the socket keep alive.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keepAlive</CODE> - <code>true</code> to turn on socket keep alive
<DT><B>Throws:</B>
<DD><CODE>java.net.SocketException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getIn()"><!-- --></A><H3>
getIn</H3>
<PRE>
protected java.io.DataInputStream <B>getIn</B>()</PRE>
<DL>
<DD>Getter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in"><CODE>in</CODE></A> field.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><CODE>InputStream</CODE> used for communication</DL>
</DD>
</DL>
<HR>
<A NAME="setIn(java.io.DataInputStream)"><!-- --></A><H3>
setIn</H3>
<PRE>
protected void <B>setIn</B>(java.io.DataInputStream in)</PRE>
<DL>
<DD>Setter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in"><CODE>in</CODE></A> field.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the <CODE>InputStream</CODE> to be used for communication</DL>
</DD>
</DL>
<HR>
<A NAME="getOut()"><!-- --></A><H3>
getOut</H3>
<PRE>
protected java.io.DataOutputStream <B>getOut</B>()</PRE>
<DL>
<DD>Getter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out"><CODE>out</CODE></A> field.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><CODE>OutputStream</CODE> used for communication</DL>
</DD>
</DL>
<HR>
<A NAME="setOut(java.io.DataOutputStream)"><!-- --></A><H3>
setOut</H3>
<PRE>
protected void <B>setOut</B>(java.io.DataOutputStream out)</PRE>
<DL>
<DD>Setter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out"><CODE>out</CODE></A> field.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>out</CODE> - the <CODE>OutputStream</CODE> to be used for communication</DL>
</DD>
</DL>
<HR>
<A NAME="getHost()"><!-- --></A><H3>
getHost</H3>
<PRE>
protected java.lang.String <B>getHost</B>()</PRE>
<DL>
<DD>Get the server host name.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the host name as a <code>String</code></DL>
</DD>
</DL>
<HR>
<A NAME="getPort()"><!-- --></A><H3>
getPort</H3>
<PRE>
protected int <B>getPort</B>()</PRE>
<DL>
<DD>Get the server port number.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the host port as an <code>int</code></DL>
</DD>
</DL>
<HR>
<A NAME="finalize()"><!-- --></A><H3>
finalize</H3>
<PRE>
protected void <B>finalize</B>()
throws java.lang.Throwable</PRE>
<DL>
<DD>Finalize this object by releasing its resources.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Throwable</CODE></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=3 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="class-use/SharedSocket.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../../net/sourceforge/jtds/jdbc/SharedNamedPipe.html" title="class in net.sourceforge.jtds.jdbc"><B>PREV CLASS</B></A>
<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html" title="class in net.sourceforge.jtds.jdbc"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="SharedSocket.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: <A HREF="#nested_class_summary">NESTED</A> | <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>
Generated on December 30 2009
</BODY>
</HTML>
|