ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/host/vb_net_test/nettest.frm
(Generate patch)

Comparing experimental/host/vb_net_test/nettest.frm (file contents):
Revision 1.27 by pjm2, Wed Feb 28 09:18:26 2001 UTC vs.
Revision 1.29 by pjm2, Wed Feb 28 10:45:37 2001 UTC

# Line 283 | Line 283 | Private Sub TCPSock_DataArrival(ByVal bytesTotal As Lo
283      ' Remove linefeeds and returns from the line.
284      response = Replace(response, Chr(13), "")
285      response = Replace(response, Chr(10), "")
286    'Text4.Text = Text4.Text & vbCrLf & response
286      
287      If connected = False Then
288          ' Perform TCP configuration (1.1)
# Line 299 | Line 298 | Private Sub TCPSock_DataArrival(ByVal bytesTotal As Lo
298                  lastModified = response
299                  Text1.Text = Text1.Text & response & vbCrLf
300                  TCPSock.SendData "FILELIST" & vbCrLf
301 <            ''' Uncomment this for new protocol release.
303 <            'Case 2a:
304 <                'If response = "ERROR" Then GoTo configError
305 <                'fileList = response
306 <                'Text1.Text = Text1.Text & response & vbCrLf
307 <                'TCPSock.SendData "FQDN" & vbCrLf
301 >            ' New addition to the protocol.
302              Case 3:
303                  If response = "ERROR" Then GoTo configError
304                  fileList = response
305                  Text1.Text = Text1.Text & response & vbCrLf
306 <                ' REMOVE above line, uncomment next
313 <                'machineName = response
314 <                TCPSock.SendData "UDPUpdateTime" & vbCrLf
306 >                TCPSock.SendData "FQDN" & vbCrLf
307              Case 4:
308                  If response = "ERROR" Then GoTo configError
309 +                Text1.Text = Text1.Text & response & vbCrLf
310 +                machineName = response
311 +                TCPSock.SendData "UDPUpdateTime" & vbCrLf
312 +            Case 5:
313 +                If response = "ERROR" Then GoTo configError
314                  UDPUpdateTime = response
315                  Text1.Text = Text1.Text & response & vbCrLf
316                  TCPSock.SendData "TCPUpdateTime" & vbCrLf
317 <            Case 5:
317 >            Case 6:
318                  If response = "ERROR" Then GoTo configError
319                  TCPUpdateTime = response
320                  Text1.Text = Text1.Text & response & vbCrLf
321                  TCPSock.SendData "ENDCONFIG" & vbCrLf
322 <            Case 6:
322 >            Case 7:
323                  If Not response = "OK" Then GoTo configError
324                  Text1.Text = Text1.Text & response & vbCrLf
325                  TCPSock.SendData "FILTER" & vbCrLf
326 <            Case 7:
326 >            Case 8:
327                  Text1.Text = Text1.Text & response & vbCrLf
328                  'we got a filter list here.
329                  readTo = 0
# Line 341 | Line 338 | Private Sub TCPSock_DataArrival(ByVal bytesTotal As Lo
338                  ' get TCP Port number
339                  filterTCPPort = response
340                  TCPSock.SendData "END" & vbCrLf
341 <            Case 8:
341 >            Case 9:
342                  If Not response = "OK" Then GoTo configError
343                  connected = True
344                  responseNumber = 0
# Line 407 | Line 404 | Private Sub Timer1_Timer()
404          seqNo = seqNo + 1
405          
406          ' Comment this line in the next protocol
407 <        machineName = TCPSock.LocalHostName
407 >        'machineName = TCPSock.LocalHostName
408          
409          LocalIP = TCPSock.LocalIP
410          packetDate = Date2Num()
# Line 447 | Line 444 | Private Sub Timer1_Timer()
444          Dim memory&
445          GlobalMemoryStatus memsts
446          memory& = memsts.dwTotalPhys
447 <        memTotal = memory& \ 1024
447 >        memTotal = memory& \ 1048576
448          memory& = memsts.dwAvailPhys
449 <        memFree = memory& \ 1024
449 >        memFree = memory& \ 1048576
450          memory& = memsts.dwTotalVirtual
451 <        swapTotal = memory& \ 1024
451 >        swapTotal = memory& \ 1048576
452          memory& = memsts.dwAvailVirtual
453 <        swapFree = memory& \ 1024
453 >        swapFree = memory& \ 1048576
454          
455          uptime = CUpTime.MilliSecs \ 1000
456          
# Line 461 | Line 458 | Private Sub Timer1_Timer()
458          cpu_time = CUpTime.CPUTime
459          percent_idle = CUpTime.PercentIdle
460          
461 +        userCount = wksta.LoggedOnUsers
462 +        
463          ' build the contents of the XML packet
464          xml = "<packet seq_no=""" & seqNo & """ machine_name=""" & machineName & """ date=""" & packetDate & """ type=""data"" ip=""" & LocalIP & """>" & _
465                "<os>" & _
# Line 472 | Line 471 | Private Sub Timer1_Timer()
471                  "<processor>" & processorType & "</processor>" & _
472                  "<uptime>" & uptime & "</uptime>" & _
473                "</os>" & _
474 +              "<users><count>" & userCount & "</count></users>" & _
475                "<cpu><idle>" & percent_idle & "</idle><user>" & cpu_time & "</user></cpu>" & _
476                "<memory><total>" & memTotal & "</total><free>" & memFree & "</free></memory>" & _
477                "<swap><total>" & swapTotal & "</total><free>" & swapFree & "</free></swap>" & _

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines