|
.NET Framework | |||||||||
| PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT | |||||||||
Uses asynchronous communications
| Field Summary | |
|---|---|
| string | address |
| System.Collections.ArrayList | connections |
| bool | gcInProgress |
| int | port |
| System.Net.Sockets.Socket | socket |
| Fields inherited from class ClintHeyer.Httpd.ServerManager |
|---|
| url |
| Fields inherited from class ClintHeyer.Httpd.Context |
|---|
| configuration, contexts, padlock, parent, requiresSession, sessionManager, throttleRate |
| Constructor Summary | |
|---|---|
|
ServerManagerAsync(int port) Constructor |
|
| Property Summary | |
|---|---|
| string |
Address
Gets the address this server is bound too |
| int | Connections |
| int |
Port
Gets the port server was started on |
| Properties inherited from class ClintHeyer.Httpd.ServerManager |
|---|
| TicketIssuer, Url |
| Properties inherited from class ClintHeyer.Httpd.Context |
|---|
| Lock, Parent, RequiresSession, ServerManager, SessionManager, ThrottleRate |
| Method Summary | |
|---|---|
| bool |
AllowConnection(System.IAsyncResult ar) Determines whether an initial connection request is allowed. |
| void |
BindSocket(int port) Binds the server to a port |
| void |
Close() Shut down server |
| void |
ConnectionClosed(ClintHeyer.Httpd.Connection connection) A notification from a Connection that it has closed, and that the manager should clean up at its end. |
| void | GCConnections() |
| void |
OnConnectRequest(System.IAsyncResult ar) Connection request |
| void | StartListening() |
| Methods inherited from class ClintHeyer.Httpd.ServerManager |
|---|
| Finalize, GetMimeType, HandleRequest, LoadConfig, SaveConfig |
| Methods inherited from class ClintHeyer.Httpd.Context |
|---|
| AddContext, AddResponseHandler, CanHandleRequest, GetContexts, GetResponseHandler, Handle, IConfigurable.Get, IConfigurable.GetBool, IConfigurable.GetFloat, IConfigurable.GetInt, IConfigurable.GetString, OnReplyCompleted, OnReplyCompletedEvent, OnReplyStarted, OnReplyStartedEvent, OnThrottleChange, OnThrottleChangeEvent, RemoveContext |
| Methods inherited from class System.Object |
|---|
| Equals, GetHashCode, GetType, MemberwiseClone, ToString |
| Events inherited from class ClintHeyer.Httpd.Context |
|---|
| ReplyCompleted, ReplyStarted, ThrottleChange |
| Field Detail |
|---|
protected string address
protected System.Collections.ArrayList connections
private bool gcInProgress
protected int port
protected System.Net.Sockets.Socket socket
| Constructor Detail |
|---|
public ServerManagerAsync(int port)
Constructor
Parameters:
port - Port to listen tooClintHeyer.Httpd.ServerBindException - Server cannot bind to specified port| Property Detail |
|---|
public string Address
Gets the address this server is bound too
public int Connections
public int Port
Gets the port server was started on
| Method Detail |
|---|
protected bool AllowConnection(System.IAsyncResult ar)
Determines whether an initial connection request is allowed.
This can be overrided to provide 'hard' over-load protection, by arbitarily dropping socket connection requests, or making the server somewhat invisible to certain requesters by refusing connection.
Parameters:ar - Async socket connection request result. The System.IAsyncResult.AsyncState property
can be cast to a Socket. Do not call System.Net.Sockets.Socket.EndAccept(System.IAsyncResult), or otherwise change socket.
protected void BindSocket(int port)
Binds the server to a port
Parameters:
port - Port numberpublic void Close()
Shut down server
public void ConnectionClosed(ClintHeyer.Httpd.Connection connection)
A notification from a Connection that it has closed, and that the manager should clean up at its end.
Parameters:
connection - public void GCConnections()
protected void OnConnectRequest(System.IAsyncResult ar)
Connection request
Parameters:
ar - private void StartListening()
|
.NET Framework | |||||||||
| PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT | |||||||||