completed close(), read() and write()
added sendAndWaitforAck()
added some port/ip checking methods in TCPSegment
changed isValidSegment in tcb

TODO: simultaneous close