mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
replace external httpserver by embedded one (based on same code) - This may still be very bad; clean solution and runprebuild, or clone to clan folder
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace OSHttpServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Invoked when a client have been accepted by the <see cref="OSHttpListener"/>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Can be used to revoke incoming connections
|
||||
/// </remarks>
|
||||
public class ClientAcceptedEventArgs : EventArgs
|
||||
{
|
||||
private readonly Socket _socket;
|
||||
private bool _revoke;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClientAcceptedEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="socket">The socket.</param>
|
||||
public ClientAcceptedEventArgs(Socket socket)
|
||||
{
|
||||
_socket = socket;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accepted socket.
|
||||
/// </summary>
|
||||
public Socket Socket
|
||||
{
|
||||
get { return _socket; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client should be revoked.
|
||||
/// </summary>
|
||||
public bool Revoked
|
||||
{
|
||||
get { return _revoke; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client may not be handled.
|
||||
/// </summary>
|
||||
public void Revoke()
|
||||
{
|
||||
_revoke = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user