Using hash table for managing streams in a connection