public void CheckConnection(object state) { // First see if we have written or can write. WriteCheck(); // Now check is we've read anything, if not then we send // a new KeepAlive with response required. ReadCheck(); }