As for local/remote, halfclose(local) means the local endpoint will no longer send frames other than WINDOW_UPDATE, PRIORITY, and RST_STREAM, but the remote is free to send any frame. And vice versa. local and remote is to indicate which side will no longer send. There's more detailed explanation here https://httpwg.org/specs/rfc7540.html#StreamStates.