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.12 by pjm2, Fri Feb 23 12:01:14 2001 UTC vs.
Revision 1.13 by pjm2, Fri Feb 23 13:23:53 2001 UTC

# Line 124 | Line 124 | Private Declare Function GetPrivateProfileInt Lib "ker
124   Dim filterManagerHostname As String
125   Dim filterManagerTCPPort As Integer
126  
127 + Dim seqNo As Long
128 + Dim machineName As String
129 +
130   Dim filterHostname As String
131   Dim filterTCPPort As Integer
132   Dim filterUDPPort As Integer
# Line 137 | Line 140 | Dim protocolVersion As String
140   Dim connected As Boolean
141   Dim responseNumber As Integer
142  
140
141 Private Sub Command1_Click()
142
143    ' build the contents of the XML packet.
144    xml = "<packet></packet>"
145
146    ' Use the first winsock control to send a UDP packet.
147    UDPSock.RemoteHost = filterHostname
148    UDPSock.RemotePort = filterUDPPort
149    UDPSock.SendData xml
150    Status.Caption = "i-scream Winhost " & protocolVersion & " - UDP packet sent."
151
152 End Sub
153
154
155 Private Sub Command3_Click()
156    ' establish a TCP connection to a filter
157    TCPSock.Close
158    TCPSock.Connect filterHostname, filterTCPPort
159 End Sub
160
143   Private Sub Form_Load()
144 +    x = MsgBox(Date2Num())
145 +    
146      protocolVersion = "1.1"
147 <      
147 >    
148      Status.Caption = "Loading"
149      Form1.Caption = "i-scream Winhost " & protocolVersion
150      
151      ''''TEMP
152      filterManagerHostname = "killigrew.ukc.ac.uk"
153      filterManagerTCPPort = 4567
154 <    Reconfigure_Click
171 <    Exit Sub
172 <    ''' ENDTEMP
154 >    ''''' END TEMP
155      
156 +    GoTo skip
157      On Error GoTo iniError
158      Dim buf As String * 256
159      Dim length As Long
# Line 178 | Line 161 | Private Sub Form_Load()
161      filterManagerHostname = Left$(buf, length)
162      length = GetPrivateProfileString("i-scream Winhost", "FilterManagerPort", "<no value>", buf, Len(buf), App.Path & "winhost.ini")
163      filterManagerTCPPort = Left$(buf, length)
164 <    
164 > skip:
165 >
166      Status.Caption = "Connecting to Filter Manager"
167 +    Reconfigure_Click
168      
169      Exit Sub
170      
# Line 344 | Line 329 | Private Sub Timer1_Timer()
329      
330      If Label3.Caption < 1 Then
331          ' build the contents of the XML packet.
332 <        xml = "<packet></packet>"
332 >        localIP = TCPSock.localIP
333 >        machineName = TCPSock.LocalHostName
334 >        seqNo = seqNo + 1
335 >        packetDate = Now()
336 >        xml = "<packet seq_no=""" & seqNo & """ machine_name=""" & machineName & """ date=""" & packetDate & """ type=""data"" ip=""" & localIP & """>" & _
337 >              "" & _
338 >              "" & _
339 >              "" & _
340 >              "" & _
341 >              "" & _
342 >              "" & _
343 >              "" & _
344 >              "" & _
345 >              "" & _
346 >              "" & _
347 >              "" & _
348 >              "" & _
349 >              "" & _
350 >              "" & _
351 >              ""
352 >        Text4.Text = Text4.Text + xml
353  
354          ' Use the first winsock control to send a UDP packet.
355          UDPSock.RemoteHost = filterHostname
# Line 362 | Line 367 | Private Sub Timer1_Timer()
367      End If
368  
369   End Sub
370 +
371 + Function Date2Num() As Long
372 +    Date2Num = DateDiff("s", "1-1-1970", Now)
373 + End Function

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines