1108
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
1152
|
3 |
|
1155
|
4 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
5 |
|
1108
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
7 |
SWING Research Group, Czech Technical University in Prague
|
|
8 |
|
|
9 |
This software is furnished under a license and may be used
|
|
10 |
only in accordance with the terms of that license and with the
|
|
11 |
inclusion of the above copyright notice. This software may not
|
|
12 |
be provided or otherwise made available to, or used by, any
|
|
13 |
other person. No title to or ownership of the software is
|
|
14 |
hereby transferred.
|
|
15 |
|
1155
|
16 |
[1] Code written at SWING Research Group contains a signature
|
|
17 |
of one of the above copright owners. For exact set of such code,
|
|
18 |
see the differences between this version and version stx:libjava
|
1152
|
19 |
as of 1.9.2010
|
1108
|
20 |
"
|
|
21 |
"{ Package: 'stx:libjava' }"
|
|
22 |
|
|
23 |
Socket subclass:#JavaSocket
|
|
24 |
instanceVariableNames:'options'
|
|
25 |
classVariableNames:'Defaults'
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Support'
|
|
28 |
!
|
|
29 |
|
|
30 |
!JavaSocket class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
1152
|
35 |
|
1155
|
36 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
37 |
|
1108
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
39 |
SWING Research Group, Czech Technical University in Prague
|
|
40 |
|
|
41 |
This software is furnished under a license and may be used
|
|
42 |
only in accordance with the terms of that license and with the
|
|
43 |
inclusion of the above copyright notice. This software may not
|
|
44 |
be provided or otherwise made available to, or used by, any
|
|
45 |
other person. No title to or ownership of the software is
|
|
46 |
hereby transferred.
|
|
47 |
|
1155
|
48 |
[1] Code written at SWING Research Group contains a signature
|
|
49 |
of one of the above copright owners. For exact set of such code,
|
|
50 |
see the differences between this version and version stx:libjava
|
1152
|
51 |
as of 1.9.2010
|
1108
|
52 |
|
|
53 |
"
|
|
54 |
! !
|
|
55 |
|
|
56 |
!JavaSocket class methodsFor:'initialization'!
|
|
57 |
|
|
58 |
initialize
|
|
59 |
"Invoked at system start or when the class is dynamically loaded."
|
|
60 |
|
|
61 |
"/ please change as required (and remove this comment)
|
|
62 |
|
|
63 |
Defaults := Dictionary new.
|
|
64 |
Defaults at: #TCP_NODELAY put: false.
|
|
65 |
Defaults at: #SO_LINGER put: -1.
|
|
66 |
|
|
67 |
"Modified: / 13-11-2011 / 23:07:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
68 |
! !
|
|
69 |
|
|
70 |
!JavaSocket methodsFor:'options'!
|
|
71 |
|
|
72 |
getSocketOption: option
|
|
73 |
|
|
74 |
options isNil ifTrue:[options := Dictionary new].
|
|
75 |
^options at: option ifAbsent:[Defaults at: option ifAbsent:[false]]
|
|
76 |
|
|
77 |
"Created: / 13-11-2011 / 20:54:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
78 |
!
|
|
79 |
|
|
80 |
setSocketOption: option argument: arg1 argument: arg2
|
|
81 |
|
|
82 |
super setSocketOption: option argument: arg1 argument: arg2.
|
|
83 |
options isNil ifTrue:[options := Dictionary new].
|
|
84 |
option == #SO_LINGER ifTrue:[
|
|
85 |
arg1 == false ifTrue:[
|
|
86 |
options at: option put: -1
|
|
87 |
] ifFalse:[
|
|
88 |
options at: option put: arg2
|
|
89 |
].
|
|
90 |
] ifFalse:[
|
|
91 |
options at: option put: arg1
|
|
92 |
]
|
|
93 |
|
|
94 |
"Created: / 13-11-2011 / 20:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
95 |
! !
|
|
96 |
|
|
97 |
!JavaSocket class methodsFor:'documentation'!
|
|
98 |
|
1864
|
99 |
version_HG
|
|
100 |
|
|
101 |
^ '$Changeset: <not expanded> $'
|
|
102 |
!
|
|
103 |
|
1108
|
104 |
version_SVN
|
1864
|
105 |
^ '§Id§'
|
1108
|
106 |
! !
|
|
107 |
|
|
108 |
JavaSocket initialize!
|