'****** Server side *******
'stream is a BinaryFile object, server is a Server object and client is a Client object.
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
sform.Show
Server.New1(50000) 'Listens on port 50000 (all ip's available).
Server.Start
Timer1.Enabled = True
End Sub
Sub Timer1_Tick
If Server.Pending = True Then
Timer1.Enabled = False
'Server.New1(50000) 'Listens on port 50000 (all ip's available).
Client.Value = Server.Accept
Msgbox("Server connected.")
stream.New1(Client.GetStream,False) 'Creates a BinaryFile object using the GetStream method.
stream.WriteString("This message will be sent to the client.")
'Do the communication here
End If
End Sub