protected BasicSocket(IPAddress ip, SocketType socketType, SocketSide socketSide, SocketEventProvider eventProvider) { IP = ip; SockType = socketType; SockSide = socketSide; (EventProvider = eventProvider).ProcessHandler += EventProvider_ProcessHandler; ReUse(); }
protected SenderSocket(IPAddress ip, SocketType socketType, SocketSide socketSide, SocketEventProvider eventProvider) : base(ip, socketType, socketSide, eventProvider) { Pack = new Packet(); if (socketType == SocketType.Stream && socketSide == SocketSide.Server) { TcpClientSockets = new List <SenderSocket>(); } }
public static SenderSocket Create(IPAddress ip, SocketSide socketSide, SocketEventProvider eventProvider) { switch (socketSide) { default: case SocketSide.Server: return(new TcpServerSocket(ip, eventProvider)); case SocketSide.Client: return(new TcpClientSocket(ip, eventProvider)); } }
public UdpSocketProvider(IPAddress ip, SocketSide socketSide) { Sender = new UdpSocket(ip, socketSide, EventProvider); }
public TcpReceiveSocket(Socket socket, SocketSide socketSide, SocketEventProvider eventProvider) : base(((IPEndPoint)socket.RemoteEndPoint).Address, SocketType.Stream, socketSide, eventProvider) { Sock = socket; }
public UdpSocket(IPAddress ip, SocketSide socketSide, SocketEventProvider eventProvider) : base(ip, SocketType.Dgram, socketSide, eventProvider) { }
public TcpSocketProvider(IPAddress ip, SocketSide socketSide) { Sender = TcpSocketFactory.Create(ip, socketSide, EventProvider); }