Esempio n. 1
0
    public static int SendDisConnect()                                                                                          // Connection
    {
        TcpCln pNet = TcpApp.GetMainNet();

        pNet.SetIoEvent(OnIoEvent);
        pNet.CloseSocket();
        return(NTC.OK);
    }
Esempio n. 2
0
    public static int SendConnect(string _ip, string _pt)                                               // Connection
    {
        TcpApp.Clear();

        TcpCln pNet = TcpApp.GetMainNet();
        int    hr   = 0;
        int    pt   = Convert.ToInt32(_pt);

        pNet.SetIoEvent(OnIoEvent);

        pNet.CloseSocket();
        hr = pNet.Create(null, _ip, pt);
        hr = pNet.Connect();
        return(hr);
    }