diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2019-02-11 18:24:37 +0000 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-02-12 17:35:56 +0100 |
commit | 32423ccaa1fb4d4777dbc4e3e3da331a1616a489 (patch) | |
tree | 098e0625999b5718bf09c9a0c0a8195ee77e40cc /chardev/char-parallel.c | |
parent | b5e18e51498a7867b7a540221e8dac17911446af (diff) |
chardev: use a state machine for socket connection state
The socket connection state is indicated via the 'bool connected' field
in the SocketChardev struct. This variable is somewhat misleading
though, as it is only set to true once the connection has completed all
required handshakes (eg for TLS, telnet or websockets). IOW there is a
period of time in which the socket is connected, but the "connected"
flag is still false.
The socket chardev really has three states that it can be in,
disconnected, connecting and connected and those should be tracked
explicitly.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190211182442.8542-12-berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'chardev/char-parallel.c')
0 files changed, 0 insertions, 0 deletions