BCB: tclientsocket, tserversocket Control

Source: Internet
Author: User

1. First, the server enables the listener.

Serversocket1-> Port = strtoint (5000 );
Serversocket1-> active = true;

The serversocket1 control responds to the serversocket1listen event;

 

2. Create a connection

Clientsocket1-> address = "127.0.0.1 ";
Clientsocket1-> Port = strtoint (5000 );
Clientsocket1-> active = true;

The clientsocket1 control first responds to the clientsocket1lookup event;

Clientsocket1 control, and then the corresponding clientsocket1ing ing event; (if an error occurs during connection to the server, the clientsocket1error event is handled ).

The clientsocket1 control then responds to the clientsocket1connect event;

The serversocket1 control responds to the serversocket1getsocket event;

The serversocket1 control responds to the serversocket1acceptt event;

The clientsocket1 control then responds to the clientsocket1write event;

3. The client sends

The serversocket1 control responds to the serversocket1clientread event. In this event, the Service sends authentication to the customer, which is received by the clientsocket1read event.

 

4. Event Description:

The clientsocket1 control, the clientsocket1read event receives the information sent back by the Service.

The clientsocket1 control then responds to the clientsocket1write event;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.