예제 #1
0
        protected override void OnConnect(IAsyncResult res)
        {
            Socket s = (Socket)res.AsyncState;

            if (!s.Connected)
            {
                Console.WriteLine("Unable to connect to Provider server {0}, check if it's running and that the ports match", this);
                OnConnectionRefused(this, new EventArgs());
            }
            else
            {
                base.OnConnect(res);
                Skt.BeginReceive(Buffer, 0, (int)Constants.BUF_ALLOC_SIZE, SocketFlags.None, OnRecvBegin, Skt);
            }
        }
예제 #2
0
 override public void Start()
 {
     Skt.BeginConnect(IPE, OnConnect, Skt);
 }
예제 #3
0
 override public void Start()
 {
     Skt.BeginReceive(Buffer, 0, (int)Constants.BUF_ALLOC_SIZE, SocketFlags.None, OnRecvBegin, Skt);
 }