'Server
Private Sub Form_Load()
''oflameron - Winsock name
Form1.Visible = True
Do
If oflameron.State <> sckConnected And oflameron.State <> sckListening Then 'Is the connection available or do we listen to the port?
oflameron.Close 'All the connections are switched off
oflameron.Listen ''Listen port 125
End If
DoEvents
Loop
End Sub
Private Sub oflameron_ConnectionRequest(ByVal requestID As Long) 'Request for connection
oflameron.Close 'Listen close
oflameron.Accept requestID 'Let's tap a Client with the number of his request.
End Sub
Private Sub oflameron_DataArrival(ByVal bytesTotal As Long)
Dim Data As String 'Variable Data
oflameron.GetData Data 'It will contain the received data
Text1.Text = Data
If Data = "END" Then End ''If the text command END is received, you shall finish the work of server
If Data = "NOTEPAD" Then Shell ("notepad.exe") ''To start up the application Notepad on the side of the server
End Sub