fixes #1286; object case transitions are now sound

This commit is contained in:
Andreas Rumpf 2019-05-26 23:10:34 +02:00
commit 49e686ab4e
14 changed files with 123 additions and 166 deletions

View file

@ -115,20 +115,16 @@ type
AsyncSocketDesc = object
fd: SocketHandle
closed: bool ## determines whether this socket has been closed
case isBuffered: bool ## determines whether this socket is buffered.
of true:
buffer: array[0..BufferSize, char]
currPos: int # current index in buffer
bufLen: int # current length of buffer
of false: nil
case isSsl: bool
of true:
when defineSsl:
sslHandle: SslPtr
sslContext: SslContext
bioIn: BIO
bioOut: BIO
of false: nil
isBuffered: bool ## determines whether this socket is buffered.
buffer: array[0..BufferSize, char]
currPos: int # current index in buffer
bufLen: int # current length of buffer
isSsl: bool
when defineSsl:
sslHandle: SslPtr
sslContext: SslContext
bioIn: BIO
bioOut: BIO
domain: Domain
sockType: SockType
protocol: Protocol