MCPcopy Create free account

hub / github.com/bloominstituteoftechnology/C-Web-Server / functions

Functions55 in github.com/bloominstituteoftechnology/C-Web-Server

↓ 28 callersFunctioncheck_cache_entries
src/cache_tests/utils.h:17
↓ 8 callersFunctionalloc_entry
* Allocate a cache entry */
src/cache.c:10
↓ 7 callersFunctioncache_put
* Store an entry in the cache * * This will also remove the least-recently-used items as necessary. * * NOTE: doesn't check for duplicate cache e
src/cache.c:123
↓ 6 callersFunctioncheck_strings
src/cache_tests/utils.h:6
↓ 5 callersFunctioncache_get
* Retrieve an entry from the cache */
src/cache.c:133
↓ 4 callersFunctioncache_create
* Create a new cache * * max_size: maximum number of entries in the cache * hashsize: hashtable size (0 for default) */
src/cache.c:92
↓ 3 callersFunctioncache_free
src/cache.c:99
↓ 2 callersFunctionadd_entry_count
* Change the entry count, maintain load metrics */
src/hashtable.c:64
↓ 2 callersFunctionfree_entry
* Deallocate a cache entry */
src/cache.c:20
↓ 2 callersFunctionhashtable_get
* Get from the hash table with a string key */
src/hashtable.c:197
↓ 2 callersFunctionllist_foreach
* For each item in the list run a function */
src/llist.c:197
↓ 1 callersFunctionfile_free
* Frees memory allocated by file_load(). */
src/file.c:71
↓ 1 callersFunctionfile_load
* Loads a file into memory and returns a pointer to the data. * * Buffer is not NUL-terminated. */
src/file.c:11
↓ 1 callersFunctionget_in_addr
* This gets an Internet address, either IPv4 or IPv6 * * Helper function to make printing easier. */
src/net.c:18
↓ 1 callersFunctionget_listener_socket
* Return the main listening socket * * Returns -1 or error */
src/net.c:32
↓ 1 callersFunctionhandle_http_request
* Handle HTTP request and send response */
src/server.c:143
↓ 1 callersFunctionhashtable_delete_bin
* Delete from the hashtable by binary key * * NOTE: does *not* free the data--just free's the hash table entry */
src/hashtable.c:235
↓ 1 callersFunctionhashtable_destroy
* Destroy a hashtable * * NOTE: does *not* free the data pointer */
src/hashtable.c:131
↓ 1 callersFunctionhashtable_get_bin
* Get from the hash table with a binary data key */
src/hashtable.c:205
↓ 1 callersFunctionhashtable_put_bin
* Put to hash table with a binary key */
src/hashtable.c:154
↓ 1 callersFunctionllist_append
* Append to the end of a list */
src/llist.c:62
↓ 1 callersFunctionllist_create
* Allocate a new linked list */
src/llist.c:12
↓ 1 callersFunctionllist_delete
* Delete an element in the list * * cmpfn should return 0 if the comparison to this node's data is equal. * * NOTE: does *not* free the data--it m
src/llist.c:154
↓ 1 callersFunctionllist_destroy
* Destroy a linked list * * If destfn is not NULL, it is called with the node data before the * node is deallocated. * * NOTE: does *not* dealloc
src/llist.c:25
↓ 1 callersFunctionllist_find
* Find an element in the list * * cmpfn should return 0 if the comparison to this node's data is equal. */
src/llist.c:124
↓ 1 callersFunctionllist_insert
* Insert at the head of a linked list */
src/llist.c:42
↓ 1 callersFunctionmime_type_get
* Return a MIME type for a given filename */
src/mime.c:22
↓ 1 callersFunctionsend_response
* Send an HTTP response * * header: "HTTP/1.1 404 NOT FOUND" or "HTTP/1.1 200 OK", etc. * content_type: "text/plain", etc. * body: t
src/server.c:51
↓ 1 callersFunctionstrlower
* Lowercase a string */
src/mime.c:10
Functionall_tests
src/cache_tests/cache_tests.c:149
Functiondefault_hashf
* Default modulo hashing function */
src/hashtable.c:73
Functiondllist_insert_head
* Insert a cache entry at the head of the linked list */
src/cache.c:30
Functiondllist_move_to_head
* Move a cache entry to the head of the list */
src/cache.c:47
Functiondllist_remove_tail
* Removes the tail from the list and returns it * * NOTE: does not deallocate the tail */
src/cache.c:74
Functionfind_start_of_body
* Search for the end of the HTTP header * * "Newlines" in HTTP can be \r\n (carriage return followed by newline) or \n * (newline) or \r (carriage
src/server.c:133
Functionforeach_callback
* Foreach callback function */
src/hashtable.c:263
Functionget_d20
* Send a /d20 endpoint response */
src/server.c:76
Functionget_file
* Read and return a file from disk or cache */
src/server.c:120
Functionhashtable_create
* Create a new hashtable */
src/hashtable.c:89
Functionhashtable_delete
* Delete from the hashtable by string key */
src/hashtable.c:225
Functionhashtable_foreach
* For-each element in the hashtable * * Note: elements are returned in effectively random order. */
src/hashtable.c:276
Functionhashtable_put
* Put to hash table with a string key */
src/hashtable.c:146
Functionhtcmp
* Comparison function for hashtable entries */
src/hashtable.c:181
Functionhtent_free
* Free an htent */
src/hashtable.c:119
Functionllist_array_free
* Free an array allocated with llist_array_get(). * * NOTE: this does not modify the linked list or its data in any way. */
src/llist.c:240
Functionllist_array_get
* Allocates and returns a new NULL-terminated array of pointers to data * elements in the list. * * NOTE: This is a read-only array! Consider it an
src/llist.c:215
Functionllist_count
* Return the number of elements in the list */
src/llist.c:189
Functionllist_head
* Return the first element in a list */
src/llist.c:92
Functionllist_tail
* Return the last element in a list */
src/llist.c:104
Functionmain
* Main */
src/server.c:175
Functionresp_404
* Send a 404 response */
src/server.c:94
Functiontest_cache_alloc_entry
src/cache_tests/cache_tests.c:28
Functiontest_cache_create
src/cache_tests/cache_tests.c:8
Functiontest_cache_get
src/cache_tests/cache_tests.c:103
Functiontest_cache_put
src/cache_tests/cache_tests.c:48