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); } }
override public void Start() { Skt.BeginConnect(IPE, OnConnect, Skt); }
override public void Start() { Skt.BeginReceive(Buffer, 0, (int)Constants.BUF_ALLOC_SIZE, SocketFlags.None, OnRecvBegin, Skt); }