// 受信コールバック
        private void ReadCallback(IAsyncResult ar)
        {
            try
            {
                Socket receiveSocket = (Socket)ar.AsyncState;
                int bytesRead = receiveSocket.EndReceive(ar);

                // 受信したときは,イベントを呼び出して続行する
                if (bytesRead > 0)
                {
                    ByteArrayReadEventArgs baReadEventArgs = new ByteArrayReadEventArgs();
                    baReadEventArgs.readData = buffer;
                    baReadEventArgs.readBytes = bytesRead;
                    Read(this, baReadEventArgs);
                    mySocket.BeginReceive(buffer, 0, BufferSize, SocketFlags.None,
                        new AsyncCallback(ReadCallback), mySocket);
                }
                // エラーが発生したときは,ソケットを閉じて切断通知する
                else
                {
                    Close();
                    Closed(this, EventArgs.Empty);
                }
            }
            catch { }
        }
 /// <summary>
 /// �΃s�A�\�P�b�g(AsyncSocket)��M�C�x���g�ɑ΂��郁�\�b�h�D
 /// </summary>
 /// <param name="sender">���M��</param>
 /// <param name="e">�p�����^</param>
 public void OnRead(object sender, ByteArrayReadEventArgs e)
 {
     Add(e.readData, e.readBytes);
 }