Use select in TLCP client

Example of `tlcp_client`

```
$ gmssl tlcp_client -host ebssec.boc.cn
Connection established!
GET / HTTP/1.1[enter]
Host: localhost[enter]
[enter]
[enter]
```
This commit is contained in:
Zhi Guan
2022-07-29 11:59:25 +08:00
parent 5dadb639a8
commit 6a5eef05d5
3 changed files with 33 additions and 17 deletions

View File

@@ -595,7 +595,7 @@ int tlcp_do_connect(TLS_CONNECT *conn)
tls_send_alert(conn, TLS_alert_decrypt_error);
goto end;
}
tls_trace("Connection established!\n");
printf("Connection established!\n");
conn->protocol = TLS_protocol_tlcp;