Skip to content

Commit 42642f3

Browse files
committed
added event methods for real object handle.
1 parent 6847770 commit 42642f3

4 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
namespace GodSharp.Sockets.Abstractions.Events
2+
{
3+
public interface INetEventMethods<TConnection, TEventArgs>
4+
where TConnection : INetConnection
5+
where TEventArgs : NetEventArgs
6+
{
7+
void OnConnectedHandler(NetClientEventArgs<TConnection> args);
8+
9+
void OnReceivedHandler(NetClientReceivedEventArgs<TConnection> args);
10+
11+
void OnDisconnectedHandler(NetClientEventArgs<TConnection> args);
12+
13+
void OnStartedHandler(TEventArgs args);
14+
15+
void OnStoppedHandler(TEventArgs args);
16+
17+
void OnExceptionHandler(NetClientEventArgs<TConnection> args);
18+
}
19+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using GodSharp.Sockets.Abstractions.Events;
2+
3+
namespace GodSharp.Sockets.Abstractions
4+
{
5+
public interface ITcpClientEventHandleMethods : INetEventMethods<ITcpConnection, NetClientEventArgs<ITcpConnection>>
6+
{
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using GodSharp.Sockets.Abstractions.Events;
2+
3+
namespace GodSharp.Sockets.Abstractions
4+
{
5+
public interface ITcpServerEventHandleMethods : INetEventMethods<ITcpConnection, NetServerEventArgs>
6+
{
7+
void OnServerExceptionHandler(NetServerEventArgs args);
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using GodSharp.Sockets.Abstractions.Events;
2+
3+
namespace GodSharp.Sockets.Abstractions
4+
{
5+
public interface IUdpClientEventHandleMethods : INetEventMethods<IUdpConnection, NetClientEventArgs<IUdpConnection>>
6+
{
7+
8+
}
9+
}

0 commit comments

Comments
 (0)