Inheritance diagram for HttpServer:
Public Member Functions | |
this (IProvider provider, InternetAddress bind, int threads, ILogger logger=null) | |
this (IProvider provider, InternetAddress bind, int threads, int backlog, ILogger logger=null) | |
char[] | getProtocol () |
char[] | toString () |
ServerSocket | createSocket (InternetAddress bind, int backlog) |
ServerThread | createThread (ServerSocket socket) |
void | service (ServerThread st, IConduit conduit) |
Private Member Functions | |
this (InternetAddress bind, int threads, int backlog, ILogger logger=null) | |
char[] | getRemoteAddress (IConduit conduit) |
char[] | getRemoteHost (IConduit conduit) |
int | getPort () |
char[] | getHost () |
ILogger | getLogger () |
void | start () |
Private Attributes | |
IProvider | provider |
Definition at line 62 of file HttpServer.d.
|
Construct this server with the requisite attribites. The IProvider represents a service handler, the binding addr is the local address we'll be listening on, and 'threads' represents the number of thread to initiate. Definition at line 75 of file HttpServer.d. |
|
Construct this server with the requisite attribites. The IProvider represents a service handler, the binding addr is the local address we'll be listening on, and 'threads' represents the number of thread to initiate. Backlog is the number of "simultaneous" connection requests that a socket layer will buffer on our behalf. Definition at line 91 of file HttpServer.d. |
|
Return the protocol in use. Reimplemented from IServer. Definition at line 103 of file HttpServer.d. Referenced by toString(). |
|
Return a text string identifying this server Implements AbstractServer. Definition at line 114 of file HttpServer.d. References getProtocol(), and IProvider::toString(). |
|
Create a ServerSocket instance. Secure implementations would provide a SecureSocketServer, or something along those lines. Implements AbstractServer. Definition at line 127 of file HttpServer.d. References ServerSocket. |
|
Create a ServerThread instance. This can be overridden to create other thread-types, perhaps with additional thread- level data attached. Implements AbstractServer. Definition at line 140 of file HttpServer.d. References HttpThread. |
|
Factory method for servicing a request. We just toss the request across our bridge, for the IProvider to handle. Reimplemented from AbstractServer. Definition at line 152 of file HttpServer.d. References IProviderBridge::cross(), HttpBridge, and thread. |
|
Setup this server with the requisite attributes. The number of threads specified dictate exactly that. You might have anything between 1 thread and several hundred, dependent upon the underlying O/S and hardware. Parameter 'backlog' specifies the max number of"simultaneous" connection requests to be handled by an underlying socket implementation. Definition at line 81 of file AbstractServer.d. References AbstractServer::backlog, AbstractServer::bind, and AbstractServer::threads. |
|
Provide support for figuring out the remote address Reimplemented from IServer. Definition at line 134 of file AbstractServer.d. References InternetAddress::toAddrString(). |
|
Provide support for figuring out the remote host. Not currently implemented. Reimplemented from IServer. Definition at line 151 of file AbstractServer.d. |
|
Return the local port we're attached to Reimplemented from IServer. Definition at line 162 of file AbstractServer.d. References InternetAddress::port(). |
|
Return the local address we're attached to Reimplemented from IServer. Definition at line 174 of file AbstractServer.d. References InternetAddress::toAddrString(). |
|
Return the logger associated with this server Definition at line 186 of file AbstractServer.d. Referenced by ServerThread::run(), CacheServer::LoaderThread::this(), and ClusterServer::this(). |
|
Start this server Reimplemented in ClusterServer. Definition at line 197 of file AbstractServer.d. References AbstractServer::backlog, AbstractServer::bind, AbstractServer::createSocket(), AbstractServer::createThread(), ILogger::info(), and AbstractServer::threads. Referenced by TaskServer::start(), ClusterServer::start(), and testServer(). |
|
Definition at line 64 of file HttpServer.d. |