ae.net.asockets

Asynchronous socket abstraction.

Public Imports

ae.sys.data
public import ae.sys.data;
Undocumented in source.

Members

Classes

ConnectionAdapter
class ConnectionAdapter

Base class for a connection adapter. By itself, does nothing.

FileConnection
class FileConnection

A POSIX file stream. Allows adding a file (e.g. stdin/stdout) to the socket manager. Does not dup the given file descriptor, so "disconnecting" this connection will close it.

LineBufferedAdapter
class LineBufferedAdapter

Adapter for connections with a line-based protocol. Splits data stream into delimiter-separated lines.

StreamConnection
class StreamConnection
Undocumented in source.
TcpConnection
class TcpConnection

An asynchronous TCP connection.

TcpServer
class TcpServer

An asynchronous TCP connection server.

TimeoutAdapter
class TimeoutAdapter

Fires an event handler or disconnects connections after a period of inactivity.

Enums

ConnectionState
enum ConnectionState
Undocumented in source.
DisconnectType
enum DisconnectType
Undocumented in source.

Functions

addIdleHandler
void addIdleHandler(SocketManager socketManager, void delegate() handler)
Undocumented in source. Be warned that the author may not have intended to support it.
removeIdleHandler
void removeIdleHandler(SocketManager socketManager, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.

Imports

Address (from std.socket)
public import std.socket : Address, AddressInfo, Socket;
Undocumented in source.
AddressInfo (from std.socket)
public import std.socket : Address, AddressInfo, Socket;
Undocumented in source.
Socket (from std.socket)
public import std.socket : Address, AddressInfo, Socket;
Undocumented in source.

Interfaces

IConnection
interface IConnection

Common interface for connections and adapters.

Manifest constants

USE_SLEEP
enum USE_SLEEP;
Undocumented in source.
USE_SLEEP
enum USE_SLEEP;
Undocumented in source.

Static functions

isFun
bool isFun(T a, T b)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

SocketManager
struct SocketManager
Undocumented in source.
SocketManager
struct SocketManager
Undocumented in source.

Variables

eventCounter
int eventCounter;

Flags that determine socket wake-up events.

socketManager
SocketManager socketManager;

The default socket manager.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Stéphan Kochen <stephan@kochen.nl> Vladimir Panteleev <vladimir@thecybershadow.net> Vincent Povirk <madewokherd@gmail.com> Simon Arlott