123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using CommonLang.Property;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Pomelo
- {
- public class FastStreamConfig
- {
- public int port = 3360;
- }
- public interface IFastSession
- {
- string ConnectorId { get; }
- void doClose();
- bool IsConnected();
- string GetDescribe();
- }
-
-
-
- public abstract class FastStream
- {
- private static FastStream _instance;
- public static void init(string class_name)
- {
- if (string.IsNullOrEmpty(class_name))
- {
- class_name = typeof(FuckFastStream).FullName;
- }
- _instance = ReflectionUtil.CreateInstance(ReflectionUtil.GetType(class_name)) as FastStream;
- }
-
-
-
-
- public static FastStream instance()
- {
- return _instance;
- }
- public abstract IFastSession GetSessionByID(string sessionID);
-
-
-
-
- public abstract void Start(FastStreamConfig config, IZone zone);
-
-
-
- public abstract void Stop();
-
-
-
-
-
-
- public abstract void Send(IFastSession session, string uid, string instanceId,ArraySegment<byte> data);
- }
- }
|