File: SharedSocket.html

package info (click to toggle)
libjtds-java 1.2.2%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,600 kB
  • ctags: 8,823
  • sloc: java: 31,394; xml: 251; sh: 34; makefile: 13
file content (1384 lines) | stat: -rw-r--r-- 58,548 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Aug 22 13:39:43 MDT 2007 -->
<TITLE>
jTDS API: Class  SharedSocket
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SharedSocket.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedNamedPipe.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html"><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>  &nbsp;
&nbsp;<A HREF="SharedSocket.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sourceforge.jtds.jdbc</FONT>
<BR>
Class  SharedSocket</H2>
<PRE>
java.lang.Object
  |
  +--<B>net.sourceforge.jtds.jdbc.SharedSocket</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedLocalNamedPipe.html">SharedLocalNamedPipe</A>, <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedNamedPipe.html">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>
<DL>
<DT><B>Version: </B><DD>$Id: SharedSocket.java,v 1.39 2007/07/08 21:38:13 bheineman Exp $</DD>
<DT><B>Author: </B><DD>Mike Hutchinson.</DD>
</DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->

<A NAME="inner_class_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html">SharedSocket.VirtualSocket</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This inner class contains the state information for the virtual socket.</TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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 &nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#bufferDir">bufferDir</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancelMonitor">cancelMonitor</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancelPending">cancelPending</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A cancel packet is pending.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html">CharsetInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#charsetInfo">charsetInfo</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#doneBuffer">doneBuffer</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#globalMemUsage">globalMemUsage</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#hdrBuf">hdrBuf</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Buffer for packet header.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#host">host</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The server host name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.io.DataInputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in">in</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Input stream for network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#maxBufSize">maxBufSize</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#memoryBudget">memoryBudget</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#minMemPkts">minMemPkts</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;java.io.DataOutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out">out</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output stream for network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#packetCount">packetCount</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Count of packets received.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#peakMemUsage">peakMemUsage</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#port">port</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The server port number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#responseOwner">responseOwner</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#securityViolation">securityViolation</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#serverType">serverType</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;java.net.Socket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#socket">socket</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The shared network socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.util.ArrayList</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#socketTable">socketTable</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;java.net.Socket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#sslSocket">sslSocket</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TDS done token.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Length of TDS packet header.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#tdsVersion">tdsVersion</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tds protocol version</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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">ConnectionJDBC2</A>&nbsp;connection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;bufferDir,
             int&nbsp;tdsVersion,
             int&nbsp;serverType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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) &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#cancel(int)">cancel</A></B>(int&nbsp;streamId)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#close()">close</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#closeStream(int)">closeStream</A></B>(int&nbsp;streamId)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;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">ConnectionJDBC2</A>&nbsp;connection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html"><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 &nbsp;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">SharedSocket.VirtualSocket</A>&nbsp;vsock)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#disableEncryption()">disableEncryption</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;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&nbsp;ssl)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;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">SharedSocket.VirtualSocket</A>&nbsp;vsock,
             byte[]&nbsp;buffer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>(package private) &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#forceClose()">forceClose</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getCharset()">getCharset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html">CharsetInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getCharsetInfo()">getCharsetInfo</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getHost()">getHost</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the server host name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.DataInputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getIn()">getIn</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getMemoryBudget()">getMemoryBudget</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getMinMemPkts()">getMinMemPkts</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getNetPacket(int, byte[])">getNetPacket</A></B>(int&nbsp;streamId,
             byte[]&nbsp;buffer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a network packet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.io.DataOutputStream</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getOut()">getOut</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getPktLen(byte[])">getPktLen</A></B>(byte[]&nbsp;buf)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getPort()">getPort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/RequestStream.html">RequestStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getRequestStream(int, int)">getRequestStream</A></B>(int&nbsp;bufferSize,
                 int&nbsp;maxPrecision)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/ResponseStream.html">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">RequestStream</A>&nbsp;requestStream,
                  int&nbsp;bufferSize)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#getTdsVersion()">getTdsVersion</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#isConnected()">isConnected</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html">SharedSocket.VirtualSocket</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#lookup(int)">lookup</A></B>(int&nbsp;streamId)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#readPacket(byte[])">readPacket</A></B>(byte[]&nbsp;buffer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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) &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#sendNetPacket(int, byte[])">sendNetPacket</A></B>(int&nbsp;streamId,
              byte[]&nbsp;buffer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send a network packet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;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">CharsetInfo</A>&nbsp;charsetInfo)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;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&nbsp;in)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>(package private) static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setMemoryBudget(int)">setMemoryBudget</A></B>(int&nbsp;memoryBudget)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setMinMemPkts(int)">setMinMemPkts</A></B>(int&nbsp;minMemPkts)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;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&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setTdsVersion(int)">setTdsVersion</A></B>(int&nbsp;tdsVersion)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the TDS version field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#setTimeout(int)">setTimeout</A></B>(int&nbsp;timeout)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the socket timeout.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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.</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;</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.</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.</DL>
<HR>

<A NAME="maxBufSize"><!-- --></A><H3>
maxBufSize</H3>
<PRE>
private int <B>maxBufSize</B></PRE>
<DL>
<DD>Current maxium input buffer size.</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.</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.</DL>
<HR>

<A NAME="hdrBuf"><!-- --></A><H3>
hdrBuf</H3>
<PRE>
private final byte[] <B>hdrBuf</B></PRE>
<DL>
<DD>Buffer for packet header.</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.</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.</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.</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.</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.</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.</DL>
<HR>

<A NAME="tdsVersion"><!-- --></A><H3>
tdsVersion</H3>
<PRE>
private int <B>tdsVersion</B></PRE>
<DL>
<DD>Tds protocol version</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</DL>
<HR>

<A NAME="charsetInfo"><!-- --></A><H3>
charsetInfo</H3>
<PRE>
private <A HREF="../../../../net/sourceforge/jtds/jdbc/CharsetInfo.html">CharsetInfo</A> <B>charsetInfo</B></PRE>
<DL>
<DD>The character set to use for converting strings to/from bytes.</DL>
<HR>

<A NAME="packetCount"><!-- --></A><H3>
packetCount</H3>
<PRE>
private int <B>packetCount</B></PRE>
<DL>
<DD>Count of packets received.</DL>
<HR>

<A NAME="host"><!-- --></A><H3>
host</H3>
<PRE>
private java.lang.String <B>host</B></PRE>
<DL>
<DD>The server host name.</DL>
<HR>

<A NAME="port"><!-- --></A><H3>
port</H3>
<PRE>
private int <B>port</B></PRE>
<DL>
<DD>The server port number.</DL>
<HR>

<A NAME="cancelPending"><!-- --></A><H3>
cancelPending</H3>
<PRE>
private boolean <B>cancelPending</B></PRE>
<DL>
<DD>A cancel packet is pending.</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>.</DL>
<HR>

<A NAME="doneBuffer"><!-- --></A><H3>
doneBuffer</H3>
<PRE>
private byte[] <B>doneBuffer</B></PRE>
<DL>
<DD>Buffer for TDS_DONE packets</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.</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.</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.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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&nbsp;bufferDir,
                       int&nbsp;tdsVersion,
                       int&nbsp;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">ConnectionJDBC2</A>&nbsp;connection)
       throws java.io.IOException,
              java.net.UnknownHostException</PRE>
<DL>
<DD>Construct a <code>SharedSocket</code> object specifying host name and
 port.<DD><DL>
<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</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<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">ConnectionJDBC2</A>&nbsp;connection)
                                      throws java.io.IOException</PRE>
<DL>
<DD>Creates a <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html"><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.<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&nbsp;ssl)
                throws java.io.IOException</PRE>
<DL>
<DD>Enable TLS encryption by creating a TLS socket over the
 existing TCP/IP network socket.<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.<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">CharsetInfo</A>&nbsp;charsetInfo)</PRE>
<DL>
<DD>Set the character set descriptor to be used to translate byte arrays to
 or from Strings.<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">CharsetInfo</A> <B>getCharsetInfo</B>()</PRE>
<DL>
<DD>Retrieve the character set descriptor used to translate byte arrays to
 or from Strings.</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.<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">RequestStream</A> <B>getRequestStream</B>(int&nbsp;bufferSize,
                               int&nbsp;maxPrecision)</PRE>
<DL>
<DD>Obtain an instance of a server request stream for this socket.<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">ResponseStream</A> <B>getResponseStream</B>(<A HREF="../../../../net/sourceforge/jtds/jdbc/RequestStream.html">RequestStream</A>&nbsp;requestStream,
                                 int&nbsp;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.<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.<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&nbsp;tdsVersion)</PRE>
<DL>
<DD>Set the TDS version field.<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&nbsp;memoryBudget)</PRE>
<DL>
<DD>Set the global buffer memory limit for all instances of this driver.<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.<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&nbsp;minMemPkts)</PRE>
<DL>
<DD>Set the minimum number of packets to cache in memory before
 writing to disk.<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.<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.<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&nbsp;streamId)</PRE>
<DL>
<DD>Send a TDS cancel packet to the server.<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.<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.</DL>
<HR>

<A NAME="closeStream(int)"><!-- --></A><H3>
closeStream</H3>
<PRE>
void <B>closeStream</B>(int&nbsp;streamId)</PRE>
<DL>
<DD>Deallocate a stream linked to this socket.<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&nbsp;streamId,
                     byte[]&nbsp;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.<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&nbsp;streamId,
                    byte[]&nbsp;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.<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">SharedSocket.VirtualSocket</A>&nbsp;vsock,
                          byte[]&nbsp;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.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>vsock</CODE> - the virtual socket owning this data<DD><CODE>buffer</CODE> - the data to queue</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">SharedSocket.VirtualSocket</A>&nbsp;vsock)
                     throws java.io.IOException</PRE>
<DL>
<DD>Read a cached packet from the in memory queue or from a disk based queue.<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</DL>
</DD>
</DL>
<HR>

<A NAME="readPacket(byte[])"><!-- --></A><H3>
readPacket</H3>
<PRE>
private byte[] <B>readPacket</B>(byte[]&nbsp;buffer)
                   throws java.io.IOException</PRE>
<DL>
<DD>Read a physical TDS packet from the network.<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</DL>
</DD>
</DL>
<HR>

<A NAME="lookup(int)"><!-- --></A><H3>
lookup</H3>
<PRE>
private <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html">SharedSocket.VirtualSocket</A> <B>lookup</B>(int&nbsp;streamId)</PRE>
<DL>
<DD>Retrieves the virtual socket with the given id.<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[]&nbsp;buf)</PRE>
<DL>
<DD>Convert two bytes (in network byte order) in a byte array into a Java
 short integer.<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&nbsp;timeout)
                   throws java.net.SocketException</PRE>
<DL>
<DD>Set the socket timeout.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value in milliseconds</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.<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&nbsp;in)</PRE>
<DL>
<DD>Setter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#in"><CODE>in</CODE></A> field.<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.<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&nbsp;out)</PRE>
<DL>
<DD>Setter for <A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.html#out"><CODE>out</CODE></A> field.<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.<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.<DD><DL>
<DT><B>Returns:</B><DD>the host port as an <code>int</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SharedSocket.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedNamedPipe.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../net/sourceforge/jtds/jdbc/SharedSocket.VirtualSocket.html"><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>  &nbsp;
&nbsp;<A HREF="SharedSocket.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Generated on August 22 2007
</BODY>
</HTML>