Trong thử nghiệm này, thị trấn này có sockfd là giá trị của mô tả ổ cắm trở lại từ cuộc gọi chức năng ổ cắm, localAddress là một con trỏ đến một địa chỉ ổ cắm mà cần phải có được định nghĩa (bởi hệ thống hoặc các lập trình viên), và addrLen là độ dài của địa chỉ ổ cắm. Chúng ta sẽ thấy sau khi chức năng ràng buộc và không được sử dụng❑ Kết nối chức năngChức năng kết nối được sử dụng để thêm địa chỉ từ xa ổ cắm vào cấu trúc ổ cắm. Nó trả về −1 nếu kết nối không thành công. Chiếc nguyên mẫu được đưa ra dưới đây:
đang được dịch, vui lòng đợi..