A port is implemented as a sort of serialized queue, where you can only write and read one element at a time from the port. When you read data from a port, the element that is read is removed from the port.
IMPORTANT: The data inside ports are not saved! This means if you close and re-open the game, or reload the page then you will lose all of the data in the ports!