Results 1 to 2 of 2

Thread: hash files [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    hash files [RESOLVED]

    can someone list an example of a hash table? I've read about them but I still don't know 1)what they are 2)what they are used for 3)if they are worth using 4)how to use them

    any online links or code would help
    Last edited by Andy; Aug 13th, 2004 at 11:49 AM.

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    You probably know about MSDN, so I won't mention reading there on how to use. Why to use is a different story.

    FWIW, here's a situation where I use one. I have an application that has multiple clients connect via sockets and sends those requests through a single connection to a server. The server responds, and I need to know which client to send the message back to.

    Each client has a moniker, like 101, 102 etc, this is returned as part of the server's message. Of course, I need to know which socket to pass along the message to, this info obviously is not contained in the server's message.

    So I have a hashtable that stores the moniker and the (client) socket. So when I get a server message, I look up the moniker in the hashtable and retrieve the socket, then pass along the message.

    I'm sure the same thing could be done other ways, but the hashtable seemed perfect for this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width