Exemple #1
0
 public async Task <Msg[]> ReadMsgsAsync(int max = -1, int milliSecondsTimeout = -1)
 {
     //readBuf.Append(await sock.RcvAsync2(1024 * 4, 0));
     Msg[] msgs = readBuf.GetMsgs(max, IsFe);
     if (msgs.Length > 0)
     {
         return(msgs);
     }
     readBuf.Append(await sock.RcvAsync2(1024 * 4, milliSecondsTimeout));
     return(readBuf.GetMsgs(max, IsFe));
 }