private SocketArgs Connect(Socket Socket, Peer Peer, bool isSecure, bool isLocal) { SocketInterface sI = Sockets.Create(Socket, Peer, isSecure, isLocal); sI.Init(); return(new SocketArgs(sI)); }
public Proxy(int Port, bool isSecure, bool isLocal) { Server = new Sockets <Connection>(Port, isSecure, isLocal); Server.Closed += Closed; Server.Received += Process; Server.WriteLine += Status; Server.Connection += Connected; Server.Disconnected += Server_Disconnected; }
public void Close(string Reason) { if (isClosed) { return; } isClosed = true; if (Server != null) { Server.Close(Reason); Server = null; } }
public void Connect(string Host, int Port, int Ms, bool isSecure) { var xx = this; Sockets.Connect((Peer)xx, Host, Port, Ms, isSecure, Local, Completed); }
public void Connect(Socket Socket, Peer Peer, bool isSecure, bool isLocal) { Start(Sockets.Create(Socket, Peer, isSecure, isLocal)); }