| 18 |
|
Caption = "TCP to Filter" |
| 19 |
|
Height = 375 |
| 20 |
|
Left = 3720 |
| 21 |
< |
TabIndex = 5 |
| 21 |
> |
TabIndex = 3 |
| 22 |
|
Top = 2520 |
| 23 |
|
Width = 1575 |
| 24 |
|
End |
| 25 |
|
Begin VB.TextBox Text4 |
| 26 |
< |
Height = 2535 |
| 26 |
> |
Height = 1575 |
| 27 |
|
Left = 240 |
| 28 |
|
MultiLine = -1 'True |
| 29 |
|
ScrollBars = 2 'Vertical |
| 30 |
< |
TabIndex = 4 |
| 30 |
> |
TabIndex = 2 |
| 31 |
|
Text = "nettest.frx":0000 |
| 32 |
|
Top = 3000 |
| 33 |
|
Width = 5055 |
| 36 |
|
Caption = "TCP to FilterManager" |
| 37 |
|
Height = 375 |
| 38 |
|
Left = 3360 |
| 39 |
< |
TabIndex = 3 |
| 39 |
> |
TabIndex = 1 |
| 40 |
|
Top = 2040 |
| 41 |
|
Width = 1935 |
| 42 |
|
End |
| 51 |
|
Caption = "Send UDP" |
| 52 |
|
Height = 375 |
| 53 |
|
Left = 4320 |
| 54 |
< |
TabIndex = 2 |
| 54 |
> |
TabIndex = 0 |
| 55 |
|
Top = 1560 |
| 56 |
|
Width = 975 |
| 57 |
|
End |
| 58 |
– |
Begin VB.TextBox Text1 |
| 59 |
– |
Height = 855 |
| 60 |
– |
Left = 360 |
| 61 |
– |
TabIndex = 0 |
| 62 |
– |
Text = "<packet></packet>" |
| 63 |
– |
Top = 600 |
| 64 |
– |
Width = 4935 |
| 65 |
– |
End |
| 58 |
|
Begin MSWinsockLib.Winsock UDPSock |
| 59 |
|
Left = 4320 |
| 60 |
|
Top = 120 |
| 63 |
|
_Version = 393216 |
| 64 |
|
Protocol = 1 |
| 65 |
|
End |
| 66 |
< |
Begin VB.Label Label1 |
| 67 |
< |
Caption = "Packet contents" |
| 66 |
> |
Begin VB.Label Status |
| 67 |
> |
Caption = "Status:" |
| 68 |
|
Height = 255 |
| 69 |
< |
Left = 360 |
| 70 |
< |
TabIndex = 1 |
| 71 |
< |
Top = 360 |
| 72 |
< |
Width = 2895 |
| 69 |
> |
Left = 120 |
| 70 |
> |
TabIndex = 4 |
| 71 |
> |
Top = 5280 |
| 72 |
> |
Width = 5415 |
| 73 |
|
End |
| 74 |
|
End |
| 75 |
|
Attribute VB_Name = "Form1" |
| 103 |
|
UDPSock.RemoteHost = filterHostname |
| 104 |
|
UDPSock.RemotePort = filterUDPPort |
| 105 |
|
UDPSock.SendData xml |
| 106 |
+ |
Status.Caption = "i-scream Winhost " & protocolVersion & " - UDP packet sent." |
| 107 |
|
|
| 108 |
|
End Sub |
| 109 |
|
|
| 124 |
|
Private Sub Form_Load() |
| 125 |
|
protocolVersion = "1.1" |
| 126 |
|
|
| 127 |
+ |
Status.Caption = "i-scream Winhost " & protocolVersion |
| 128 |
+ |
|
| 129 |
|
''''TEMP |
| 130 |
|
filterManagerHostname = "killigrew.ukc.ac.uk" |
| 131 |
|
filterManagerTCPPort = 4567 |
| 140 |
|
length = GetPrivateProfileString("i-scream Winhost", "FilterManagerPort", "<no value>", buf, Len(buf), App.Path & "winhost.ini") |
| 141 |
|
filterManagerTCPPort = Left$(buf, length) |
| 142 |
|
|
| 143 |
+ |
Status.Caption = "i-scream Winhost " & protocolVersion & " connecting to Filter Manager" |
| 144 |
+ |
|
| 145 |
|
Exit Sub |
| 146 |
|
|
| 147 |
|
iniError: |
| 150 |
|
|
| 151 |
|
End Sub |
| 152 |
|
|
| 153 |
+ |
Private Sub Label1_Click() |
| 154 |
+ |
|
| 155 |
+ |
End Sub |
| 156 |
+ |
|
| 157 |
|
Private Sub TCPSock_Connect() |
| 158 |
< |
|
| 159 |
< |
responseNumber = 0 |
| 158 |
> |
|
| 159 |
> |
responseNumber = 0 |
| 160 |
|
|
| 161 |
|
' Send something as soon as we connect to the server. |
| 162 |
|
If connected = False Then |
| 225 |
|
responseNumber = 0 |
| 226 |
|
TCPSock.Close |
| 227 |
|
Text4.Text = Text4.Text & vbCrLf & " <closed>" |
| 228 |
< |
x = MsgBox("got config okay") |
| 228 |
> |
Status.Caption = "i-scream Winhost " & protocolVersion & " - got config okay" |
| 229 |
|
End Select |
| 230 |
|
Else |
| 231 |
|
' Perform a heartbeat (1.1) |
| 246 |
|
Case 5: |
| 247 |
|
If Not response = "OK" Then GoTo heartbeatError |
| 248 |
|
TCPSock.Close |
| 249 |
< |
x = MsgBox("heartbeat sent okay.") |
| 249 |
> |
Status.Caption = "i-scream Winhost " & protocolVersion & " - heartbeat sent okay." |
| 250 |
|
End Select |
| 251 |
|
|
| 252 |
|
End If |
| 255 |
|
Exit Sub |
| 256 |
|
|
| 257 |
|
configError: |
| 258 |
< |
x = MsgBox("error doing configuration") |
| 258 |
> |
Status.Caption = "i-scream Winhost " & protocolVersion & " - FAILED to get configuration" |
| 259 |
|
heartbeatError: |
| 260 |
< |
x = MsgBox("error doing configuration") |
| 260 |
> |
Status.Caption = "i-scream Winhost " & protocolVersion & " - Heatbeat FAILED" |
| 261 |
|
End Sub |
| 262 |
|
|