| 14 |  | ScaleWidth      =   5670 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 15 |  | ShowInTaskbar   =   0   'False | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 16 |  | StartUpPosition =   3  'Windows Default | 
 
 
 
 
 
 
 
 
 
 
 | 17 | < | Begin VB.Timer TCPTimer | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 18 | < | Left            =   3360 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 19 | < | Top             =   120 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 20 | < | End | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 21 | < | Begin VB.Timer UDPTimer | 
 
 
 
 
 
 
 
 
 | 17 | > | Begin VB.Timer Timer1 | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 18 |  | Left            =   3840 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 19 |  | Top             =   120 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 20 |  | End | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 68 |  | Protocol        =   1 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 69 |  | End | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 70 |  | Begin VB.Label Label2 | 
 
 
 
 
 
 
 
 
 
 
 | 71 | < | Caption         =   "Label2" | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 71 | > | Alignment       =   1  'Right Justify | 
 
 
 
 
 | 72 | > | Caption         =   "Next heartbeat:" | 
 
 
 
 
 
 
 
 
 
 
 | 73 |  | Height          =   255 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 74 |  | Left            =   120 | 
 
 
 
 
 
 
 
 
 
 
 | 75 | < | TabIndex        =   6 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 76 | < | Top             =   600 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 77 | < | Width           =   3375 | 
 
 
 
 
 
 
 
 
 | 75 | > | TabIndex        =   8 | 
 
 
 
 
 | 76 | > | Top             =   480 | 
 
 
 
 
 | 77 | > | Width           =   1455 | 
 
 
 
 
 
 
 
 
 
 
 | 78 |  | End | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 79 |  | Begin VB.Label Label1 | 
 
 
 
 
 
 
 
 
 
 
 | 80 | < | Caption         =   "Label1" | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 80 | > | Alignment       =   1  'Right Justify | 
 
 
 
 
 | 81 | > | Caption         =   "Next UDP packet:" | 
 
 
 
 
 
 
 
 
 
 
 | 82 |  | Height          =   255 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 83 |  | Left            =   120 | 
 
 
 
 
 
 
 
 | 84 | + | TabIndex        =   7 | 
 
 
 
 
 
 
 
 | 85 | + | Top             =   120 | 
 
 
 
 
 
 
 
 | 86 | + | Width           =   1455 | 
 
 
 
 
 
 
 
 | 87 | + | End | 
 
 
 
 
 
 
 
 | 88 | + | Begin VB.Label Label4 | 
 
 
 
 
 
 
 
 | 89 | + | Caption         =   "0" | 
 
 
 
 
 
 
 
 | 90 | + | Height          =   255 | 
 
 
 
 
 
 
 
 | 91 | + | Left            =   1680 | 
 
 
 
 
 
 
 
 | 92 | + | TabIndex        =   6 | 
 
 
 
 
 
 
 
 | 93 | + | Top             =   480 | 
 
 
 
 
 
 
 
 | 94 | + | Width           =   615 | 
 
 
 
 
 
 
 
 | 95 | + | End | 
 
 
 
 
 
 
 
 | 96 | + | Begin VB.Label Label3 | 
 
 
 
 
 
 
 
 | 97 | + | Caption         =   "0" | 
 
 
 
 
 
 
 
 | 98 | + | Height          =   255 | 
 
 
 
 
 
 
 
 | 99 | + | Left            =   1680 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 100 |  | TabIndex        =   5 | 
 
 
 
 
 
 
 
 
 
 
 | 101 | < | Top             =   240 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 102 | < | Width           =   3375 | 
 
 
 
 
 
 
 
 
 | 101 | > | Top             =   120 | 
 
 
 
 
 | 102 | > | Width           =   615 | 
 
 
 
 
 
 
 
 
 
 
 | 103 |  | End | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 104 |  | Begin VB.Label Status | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 105 |  | Caption         =   "Status:" | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 264 |  | responseNumber = 0 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 265 |  | TCPSock.Close | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 266 |  | Text4.Text = Text4.Text & vbCrLf & "  <closed>" | 
 
 
 
 
 
 
 
 
 | 253 | – | Label1.Caption = "TCP hearbeat interval: " & UDPUpdateTime | 
 
 
 
 
 
 
 
 
 | 254 | – | Label2.Caption = "UDP packet interval: " & TCPUpdateTime | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 267 |  | Status.Caption = "i-scream Winhost " & protocolVersion & " - got config okay" | 
 
 
 
 
 
 
 
 | 268 | + | Label3.Caption = UDPUpdateTime | 
 
 
 
 
 
 
 
 | 269 | + | Label4.Caption = TCPUpdateTime | 
 
 
 
 
 
 
 
 | 270 | + | Timer1.Interval = 1000 | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 271 |  | End Select | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 272 |  | Else | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 273 |  | ' Perform a heartbeat (1.1) | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 297 |  | Exit Sub | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 298 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 299 |  | configError: | 
 
 
 
 
 
 
 
 
 
 
 | 300 | < | Status.Caption = "i-scream Winhost " & protocolVersion & " - FAILED to get configuration" | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 300 | > | Status.Caption = "i-scream Winhost " & protocolVersion & " - FAILED to get configuration " & Err.Description | 
 
 
 
 
 | 301 | > | Exit Sub | 
 
 
 
 
 
 
 
 
 
 
 | 302 |  | heartbeatError: | 
 
 
 
 
 
 
 
 
 
 
 | 303 | < | Status.Caption = "i-scream Winhost " & protocolVersion & " - Heatbeat FAILED" | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 303 | > | Status.Caption = "i-scream Winhost " & protocolVersion & " - Heatbeat FAILED " & Err.Description | 
 
 
 
 
 | 304 | > | Exit Sub | 
 
 
 
 
 
 
 
 
 
 
 | 305 |  | End Sub | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 306 |  |  | 
 
 
 
 
 
 
 
 | 307 | + | Private Sub TCPTimer_Timer() | 
 
 
 
 
 
 
 
 | 308 | + |  | 
 
 
 
 
 
 
 
 | 309 | + | ' establish a TCP connection to a filter | 
 
 
 
 
 
 
 
 | 310 | + | TCPSock.Close | 
 
 
 
 
 
 
 
 | 311 | + | TCPSock.Connect filterHostname, filterTCPPort | 
 
 
 
 
 
 
 
 | 312 | + |  | 
 
 
 
 
 
 
 
 | 313 | + | End Sub | 
 
 
 
 
 
 
 
 | 314 | + |  | 
 
 
 
 
 
 
 
 | 315 | + | Private Sub UDPTimer_Timer() | 
 
 
 
 
 
 
 
 | 316 | + |  | 
 
 
 
 
 
 
 
 | 317 | + | ' build the contents of the XML packet. | 
 
 
 
 
 
 
 
 | 318 | + | xml = "<packet></packet>" | 
 
 
 
 
 
 
 
 | 319 | + |  | 
 
 
 
 
 
 
 
 | 320 | + | ' Use the first winsock control to send a UDP packet. | 
 
 
 
 
 
 
 
 | 321 | + | UDPSock.RemoteHost = filterHostname | 
 
 
 
 
 
 
 
 | 322 | + | UDPSock.RemotePort = filterUDPPort | 
 
 
 
 
 
 
 
 | 323 | + | UDPSock.SendData xml | 
 
 
 
 
 
 
 
 | 324 | + | Status.Caption = "i-scream Winhost " & protocolVersion & " - UDP packet sent." | 
 
 
 
 
 
 
 
 | 325 | + |  | 
 
 
 
 
 
 
 
 | 326 | + | End Sub | 
 
 
 
 
 
 
 
 | 327 | + |  | 
 
 
 
 
 
 
 
 | 328 | + | Private Sub Timer1_Timer() | 
 
 
 
 
 
 
 
 | 329 | + |  | 
 
 
 
 
 
 
 
 | 330 | + | Label3.Caption = Label3.Caption - 1 | 
 
 
 
 
 
 
 
 | 331 | + | Label4.Caption = Label4.Caption - 1 | 
 
 
 
 
 
 
 
 | 332 | + |  | 
 
 
 
 
 
 
 
 | 333 | + | Status.Caption = "i-scream Winhost " & protocolVersion | 
 
 
 
 
 
 
 
 | 334 | + |  | 
 
 
 
 
 
 
 
 | 335 | + | If Label3.Caption < 1 Then | 
 
 
 
 
 
 
 
 | 336 | + | ' build the contents of the XML packet. | 
 
 
 
 
 
 
 
 | 337 | + | xml = "<packet></packet>" | 
 
 
 
 
 
 
 
 | 338 | + |  | 
 
 
 
 
 
 
 
 | 339 | + | ' Use the first winsock control to send a UDP packet. | 
 
 
 
 
 
 
 
 | 340 | + | UDPSock.RemoteHost = filterHostname | 
 
 
 
 
 
 
 
 | 341 | + | UDPSock.RemotePort = filterUDPPort | 
 
 
 
 
 
 
 
 | 342 | + | UDPSock.SendData xml | 
 
 
 
 
 
 
 
 | 343 | + | Status.Caption = "i-scream Winhost " & protocolVersion & " - UDP packet sent." | 
 
 
 
 
 
 
 
 | 344 | + | Label3.Caption = UDPUpdateTime | 
 
 
 
 
 
 
 
 | 345 | + | End If | 
 
 
 
 
 
 
 
 | 346 | + |  | 
 
 
 
 
 
 
 
 | 347 | + | If Label4.Caption < 1 Then | 
 
 
 
 
 
 
 
 | 348 | + | ' establish a TCP connection to a filter | 
 
 
 
 
 
 
 
 | 349 | + | TCPSock.Close | 
 
 
 
 
 
 
 
 | 350 | + | TCPSock.Connect filterHostname, filterTCPPort | 
 
 
 
 
 
 
 
 | 351 | + | Label4.Caption = TCPUpdateTime | 
 
 
 
 
 
 
 
 | 352 | + | End If | 
 
 
 
 
 
 
 
 | 353 | + |  | 
 
 
 
 
 
 
 
 | 354 | + | End Sub |