TcpConnection

Represents a socket-like interface to a TCP connection on either the client or the server side.

Constructors

this
this(int connectionId, TcpSslOptions options, NetConnectionHandler handler, Codec codec, TcpStream tcp)
Undocumented in source.

Members

Aliases

write
alias write = AbstractConnection.write
Undocumented in source.

Functions

getCloseTime
long getCloseTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getDuration
long getDuration()
Undocumented in source. Be warned that the author may not have intended to support it.
getIdleTimeout
long getIdleTimeout()
Undocumented in source. Be warned that the author may not have intended to support it.
getLastActiveTime
long getLastActiveTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getLastReadTime
long getLastReadTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getLastWrittenTime
long getLastWrittenTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getLocalAddress
Address getLocalAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
getMaxIdleTimeout
Duration getMaxIdleTimeout()
Undocumented in source. Be warned that the author may not have intended to support it.
getOpenTime
long getOpenTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getReadBytes
size_t getReadBytes()
Undocumented in source. Be warned that the author may not have intended to support it.
getRemoteAddress
Address getRemoteAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
getWrittenBytes
size_t getWrittenBytes()
Undocumented in source. Be warned that the author may not have intended to support it.
isShutdownInput
bool isShutdownInput()
Undocumented in source. Be warned that the author may not have intended to support it.
isShutdownOutput
bool isShutdownOutput()
Undocumented in source. Be warned that the author may not have intended to support it.
isWaitingForClose
bool isWaitingForClose()
Undocumented in source. Be warned that the author may not have intended to support it.
notifyClose
void notifyClose()
Undocumented in source. Be warned that the author may not have intended to support it.
onDataReceived
DataHandleStatus onDataReceived(ByteBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset()
Undocumented in source. Be warned that the author may not have intended to support it.
shutdownInput
void shutdownInput()
Undocumented in source. Be warned that the author may not have intended to support it.
shutdownOutput
void shutdownOutput()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_isShutdownInput
bool _isShutdownInput;
Undocumented in source.
_isShutdownOutput
bool _isShutdownOutput;
Undocumented in source.
_isWaitingForClose
bool _isWaitingForClose;
Undocumented in source.

Inherited Members

From AbstractConnection

_connectionId
int _connectionId;
Undocumented in source.
_tcp
TcpStream _tcp;
Undocumented in source.
_options
TcpSslOptions _options;
Undocumented in source.
_dataReceivedHandler
DataReceivedHandler _dataReceivedHandler;
Undocumented in source.
attributes
Object[string] attributes;
Undocumented in source.
_encoder
Encoder _encoder;
Undocumented in source.
_decoder
Decoder _decoder;
Undocumented in source.
_netHandler
NetConnectionHandler _netHandler;
Undocumented in source.
_connectionState
ConnectionState _connectionState;
Undocumented in source.
getId
int getId()
Undocumented in source. Be warned that the author may not have intended to support it.
getOptions
TcpSslOptions getOptions()
Undocumented in source. Be warned that the author may not have intended to support it.
getStream
TcpStream getStream()
Undocumented in source. Be warned that the author may not have intended to support it.
getState
ConnectionState getState()
Undocumented in source. Be warned that the author may not have intended to support it.
setState
void setState(ConnectionState state)
setCodec
AbstractConnection setCodec(Codec codec)
Undocumented in source. Be warned that the author may not have intended to support it.
getCodec
Codec getCodec()
Undocumented in source. Be warned that the author may not have intended to support it.
setHandler
AbstractConnection setHandler(NetConnectionHandler handler)
getHandler
NetConnectionHandler getHandler()
Undocumented in source. Be warned that the author may not have intended to support it.
isConnected
bool isConnected()
Undocumented in source. Be warned that the author may not have intended to support it.
isActive
bool isActive()
Undocumented in source. Be warned that the author may not have intended to support it.
isClosing
bool isClosing()
Undocumented in source. Be warned that the author may not have intended to support it.
isSecured
bool isSecured()
Undocumented in source. Be warned that the author may not have intended to support it.
onDataReceived
DataHandleStatus onDataReceived(ByteBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
localAddress
Address localAddress [@property getter]
remoteAddress
Address remoteAddress [@property getter]

/

write
void write(const(ubyte)[] data)

/

write
void write(string str)

/

write
void write(ByteBuffer buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ByteBuffer buffer, Callback callback)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ByteBuffer[] buffers, Callback callback)
Undocumented in source. Be warned that the author may not have intended to support it.
getAttribute
Object getAttribute(string key)

{@inheritDoc}

getAttribute
Object getAttribute(string key, Object defaultValue)

{@inheritDoc}

setAttribute
Object setAttribute(string key, Object value)

{@inheritDoc}

setAttribute
Object setAttribute(string key)

{@inheritDoc}

setAttributeIfAbsent
Object setAttributeIfAbsent(string key, Object value)

{@inheritDoc}

setAttributeIfAbsent
Object setAttributeIfAbsent(string key)

{@inheritDoc}

removeAttribute
Object removeAttribute(string key)

{@inheritDoc}

removeAttribute
bool removeAttribute(string key, Object value)

{@inheritDoc}

replaceAttribute
bool replaceAttribute(string key, Object oldValue, Object newValue)

{@inheritDoc}

containsAttribute
bool containsAttribute(string key)

{@inheritDoc}

getAttributeKeys
string[] getAttributeKeys()

{@inheritDoc}

write
void write(Object message)
Undocumented in source. Be warned that the author may not have intended to support it.
encode
void encode(Object message)
Undocumented in source. Be warned that the author may not have intended to support it.
notifyClose
void notifyClose()
Undocumented in source. Be warned that the author may not have intended to support it.
notifyException
void notifyException(Exception t)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta