-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEntityStream.rbbas
68 lines (57 loc) · 1.37 KB
/
EntityStream.rbbas
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
#tag Class
Protected Class EntityStream
#tag Method, Flags = &h0
Sub Constructor(SocketStream As TCPSocket, HTTPHeaders As HTTP.Headers)
mStream = SocketStream
Dim sz As Integer
Select Case True
Case HTTPHeaders.CommaSeparatedValues("Content-Length") <> ""
sz = Val(HTTPHeaders.CommaSeparatedValues("Content-Length"))
Case HTTPHeaders.CommaSeparatedValues("Transfer-Encoding") <> ""
sz = -1
Case HTTPHeaders.CommaSeparatedValues("Connection") = "close"
Else
sz = -1
End Select
End Sub
#tag EndMethod
#tag Property, Flags = &h21
Private mStream As TCPSocket
#tag EndProperty
#tag ViewBehavior
#tag ViewProperty
Name="Index"
Visible=true
Group="ID"
InitialValue="-2147483648"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="Left"
Visible=true
Group="Position"
InitialValue="0"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="Name"
Visible=true
Group="ID"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="Super"
Visible=true
Group="ID"
InheritedFrom="Object"
#tag EndViewProperty
#tag ViewProperty
Name="Top"
Visible=true
Group="Position"
InitialValue="0"
InheritedFrom="Object"
#tag EndViewProperty
#tag EndViewBehavior
End Class
#tag EndClass