![]() Procedure TForm1.LTCPComponent1Error(const msg: string aSocket: TLSocket) ģ. The status line also indicates the Winsock error number and the ErrorCode is then set to 0 so that no runtime error occurs. Procedure TForm1.LTCPComponent1Disconnect(aSocket:TLSocket) Īlso in case of a connection error the ClientSocket control element carries out a corresponding procedure which is essentially like the Disconnect procedure. Here again the ClientSocket control element invokes a corresponding procedure Procedure TForm1.bt_disconnectClick(Sender:TObject) The connection remains open until it is ended by the user clicking on the Disconnect button, or the Web-IO ends the connection. StatusBar1.SimpleText :=’Connected to ’ + ed_ip.Text Procedure TForm1.LTCPComponent1Connect(aSocket:TLSocket) The status line indicates that the connection has been established, the control elements are enabled for use and the Disconnect button is active again. ![]() LTCPComponent1.Connect(ed_ip.Text, strtoint(ed_port.Text)) Īs soon as the Web-IO accepts the connection, the ClientSocket control element carries out the corresponding procedure. ![]() Procedure TForm1.bt_connectClick(Sender: TObject) The connection is opened by entering the IP address of the Web-IO in the text field ed_ip and clicking on the bt_connect button. Connection control Establishing the connection In this example the first part of the name describes the type of object and the second part the function. When naming the individual objects it is helpful to use logical names. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |