public int InitIP(IPAddress IP) { Sender _socTCP; try { IPAddress hostIP = IP; _socTCP = new Sender(); IPEndPoint ep = new IPEndPoint(hostIP, Properties.Settings.Default.PTUPort); _socTCP.Connect(ep); initialized = true; PTU.Init(_socTCP); } catch { initialized = false; return -1; } return 0; }
public int Init(object data) { _sock = (Sender)data; IsInitialized = true; GetResolution(); GetUserLimits(); return 1; }