httpCloseClient (Function)
Signature: httpCloseClient(clientID: int) -> Result<int, Error>
Description: Closes the HTTP client and answers 0, or an Error.
Parameters
- clientID (
int): Client identifier to close
Returns: Result<int, Error>
Example
print(match httpCreateClient("http://127.0.0.1:18898", 1000) {
Success { value } => "closed: ${httpCloseClient(value) ?: -1}"
Error { message } => "client error: ${message}"
})
client = httpCreateClient ("http://127.0.0.1:18898", 1000)
match client > 0
true => print "closed: ${httpCloseClient client}"
false => print "client error: ${client}"