public Client this[Wo1fSocket Socket] { get { foreach (Client C in Clients) { if (C.uid == Socket.uid) return C; } return null; } }
static void Main(string[] args) { WS = new Wo1fSocket(); Cmd = new Command(); //WS.Connect(); Cmd.Register("connect", new CommandDelegate(TryConnect)); //Cmd.Register("dc", new CommandDelegate(TryDC)); Thread T = new Thread(InputThread); T.IsBackground = true; T.Start(); Application.Run(); }
public Client this[Wo1fSocket Socket] { get { foreach (Client C in Clients) { if (C.uid == Socket.uid) { return(C); } } return(null); } }
public bool Connect(string Host, int Port, bool Encrypt) { WS = new Wo1fSocket(); WS.OnRecv += new Wo1fSocket.PacketReceivedEventHandler(WS_ReceivedEvent); WS.OnConnectFail += new Wo1fSocket.OnConnectFailEventHandler(WS_OnConnectFail); WS.OnDisconnect += new Wo1fSocket.OnDisconnectEventHandler(WS_OnDisconnect); WS.OnConnectSuccess += new Wo1fSocket.OnConnectSuccessEventHandler(WS_OnConnectSuccess); bool ret = WS.Connect(Host, Port); WS.Encryption = Encrypt; CS.SysLog("Connect(" + Host + ", " + Port + "); returned " + ret.ToString() + "."); return(ret); }
public Client() { WS = new Wo1fSocket(); Init(); }
public Client(System.Net.Sockets.TcpClient tcpClient) { // TODO: Complete member initialization this.WS = new Wo1fSocket(tcpClient); Init(); }
public Client(Wo1fSocket Socket) { this.WS = Socket; Init(); }
public bool Connect(string Host, int Port, bool Encrypt) { WS = new Wo1fSocket(); WS.OnRecv += new Wo1fSocket.PacketReceivedEventHandler(WS_ReceivedEvent); WS.OnConnectFail += new Wo1fSocket.OnConnectFailEventHandler(WS_OnConnectFail); WS.OnDisconnect += new Wo1fSocket.OnDisconnectEventHandler(WS_OnDisconnect); WS.OnConnectSuccess += new Wo1fSocket.OnConnectSuccessEventHandler(WS_OnConnectSuccess); bool ret = WS.Connect(Host, Port); WS.Encryption = Encrypt; CS.SysLog("Connect(" + Host + ", " + Port + "); returned " + ret.ToString() + "."); return ret; }
public Client() { WS = new Wo1fSocket(); Init(); }
public Client(System.Net.Sockets.TcpClient tcpClient) { // TODO: Complete member initialization this.WS = new Wo1fSocket(tcpClient); Init(); }
public Client(Wo1fSocket Socket) { this.WS = Socket; Init(); }