hlSocket

Undocumented in source.

Constructors

this
this(ubyte af, int sock_type, string f, int l)
Undocumented in source.
this
this(int s, ubyte af, int sock_type, string f, int l)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

accept
void accept(hlEvLoop loop, Duration timeout, void delegate(AsyncSocketLike) @(safe) f)
Undocumented in source. Be warned that the author may not have intended to support it.
bind
void bind(Address addr)
Undocumented in source. Be warned that the author may not have intended to support it.
bind
void bind(string addr)
Undocumented in source. Be warned that the author may not have intended to support it.
blocking
bool blocking()
Undocumented in source. Be warned that the author may not have intended to support it.
blocking
void blocking(bool blocking)
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
connect
bool connect(string addr, Duration timeout)

connect synchronously (no loop, no fibers) in blocked mode

connect
bool connect(string addr, hlEvLoop loop, HandlerDelegate f, Duration timeout)

Return true if connect delayed

connect
bool connect(Address addr, hlEvLoop loop, HandlerDelegate f, Duration timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
connected
bool connected()
Undocumented in source. Be warned that the author may not have intended to support it.
describe
string describe()
Undocumented in source. Be warned that the author may not have intended to support it.
eventHandler
void eventHandler(int fd, AppEvent e)
Undocumented in source. Be warned that the author may not have intended to support it.
fileno
auto fileno()
Undocumented in source. Be warned that the author may not have intended to support it.
io
IOResult io(IORequest iorq, Duration timeout)

Make blocking IO without evelnt loop. Can be called from non-fiber context

io
int io(hlEvLoop loop, IORequest iorq, Duration timeout)

Make unblocked IO using loop

io_handler
void io_handler(AppEvent ev)
Undocumented in source. Be warned that the author may not have intended to support it.
listen
void listen(int backlog)
Undocumented in source. Be warned that the author may not have intended to support it.
open
bool open()
Undocumented in source. Be warned that the author may not have intended to support it.
send
long send(immutable(ubyte)[] data)

just send, no callbacks, no timeouts, nothing returns what os-level send returns

send
IOResult send(hlEvLoop loop, immutable(ubyte)[] data, Duration timeout, void delegate(ref IOResult) @(safe) callback)

Send data from data buffer input: data - data to send timeout - how long to wait until timedout callback - callback which accept IOResult 1. try to send as much as possible. If complete data sent, then return IOresult with empty output and clean timeout and error fileds. 2. If we can't send complete buffer, then prepare io call and return nonempty result output. So at return user have to check: a) if result.error == true - send failed b) if result.data.empty - data send completed c) otherwise io call were issued, user will receive callback

socket_errno
auto socket_errno()
Undocumented in source. Be warned that the author may not have intended to support it.
stopPolling
void stopPolling(L loop)
Undocumented in source. Be warned that the author may not have intended to support it.
timeoutHandler
void timeoutHandler(AppEvent e)
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.

Inherited Members

From AsyncSocketLike

open
bool open()
Undocumented in source.
close
void close()
Undocumented in source.
connected
bool connected()
Undocumented in source.
bind
void bind(Address addr)
Undocumented in source.
connect
bool connect(Address addr, hlEvLoop loop, HandlerDelegate f, Duration timeout)
Undocumented in source.
accept
void accept(hlEvLoop loop, Duration timeout, void delegate(AsyncSocketLike) @(safe) f)
Undocumented in source.
io
int io(hlEvLoop , IORequest , Duration )
Undocumented in source.

Meta