diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs new file mode 100644 index 0000000..83548b4 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | namespace OpenSim.Region.ScriptEngine.Common.TRPC | ||
2 | { | ||
3 | public class TCPCommon | ||
4 | { | ||
5 | public delegate void ClientConnectedDelegate(int ID, System.Net.EndPoint Remote); | ||
6 | public delegate void DataReceivedDelegate(int ID, byte[] data, int offset, int length); | ||
7 | public delegate void DataSentDelegate(int ID, int length); | ||
8 | public delegate void CloseDelegate(int ID); | ||
9 | public delegate void ConnectErrorDelegate(string Reason); | ||
10 | |||
11 | |||
12 | public interface ServerAndClientInterface | ||
13 | { | ||
14 | void Send(int clientID, byte[] data, int offset, int len); | ||
15 | event ClientConnectedDelegate ClientConnected; | ||
16 | event DataReceivedDelegate DataReceived; | ||
17 | event DataSentDelegate DataSent; | ||
18 | event CloseDelegate Close; | ||
19 | } | ||
20 | public interface ClientInterface : ServerAndClientInterface | ||
21 | { | ||
22 | event TCPCommon.ConnectErrorDelegate ConnectError; | ||
23 | void Connect(string RemoteHost, int RemotePort); | ||
24 | void Disconnect(int ID); | ||
25 | } | ||
26 | public interface ServerInterface : ServerAndClientInterface | ||
27 | { | ||
28 | void StartListen(); | ||
29 | void StopListen(); | ||
30 | } | ||
31 | |||
32 | } | ||
33 | } \ No newline at end of file | ||