void addLastRead(ConnectionUDP conn) { lock (this) { if (!taskTable.ContainsKey(conn.connectId)) { AckListTask at = new AckListTask(conn); taskTable.Add(conn.connectId, at); } } }
void addAck(ConnectionUDP conn, int sequence) { lock (this) { if (!taskTable.ContainsKey(conn.connectId)) { AckListTask at = new AckListTask(conn); taskTable.Add(conn.connectId, at); } AckListTask at1 = taskTable[conn.connectId]; at1.addAck(sequence); } }