extracted http server, web socket server and udp server dependancies

This commit is contained in:
LukePulverenti
2013-02-23 17:31:51 -05:00
parent 1a423c43b4
commit 2e4db75540
39 changed files with 893 additions and 359 deletions

View File

@@ -1,7 +1,46 @@

using System;
using System.Threading.Tasks;
namespace MediaBrowser.Common.Net
{
public interface IUdpServer
/// <summary>
/// Interface IUdpServer
/// </summary>
public interface IUdpServer : IDisposable
{
/// <summary>
/// Occurs when [message received].
/// </summary>
event EventHandler<UdpMessageReceivedEventArgs> MessageReceived;
/// <summary>
/// Starts the specified port.
/// </summary>
/// <param name="port">The port.</param>
void Start(int port);
/// <summary>
/// Stops this instance.
/// </summary>
void Stop();
/// <summary>
/// Sends the async.
/// </summary>
/// <param name="bytes">The bytes.</param>
/// <param name="remoteEndPoint">The remote end point.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException">data</exception>
Task SendAsync(byte[] bytes, string remoteEndPoint);
/// <summary>
/// Sends the async.
/// </summary>
/// <param name="bytes">The bytes.</param>
/// <param name="ipAddress">The ip address.</param>
/// <param name="port">The port.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException">bytes</exception>
Task SendAsync(byte[] bytes, string ipAddress, int port);
}
}