Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bloominstituteoftechnology/C-Web-Server
/ functions
Functions
55 in github.com/bloominstituteoftechnology/C-Web-Server
⨍
Functions
55
◇
Types & classes
33
↓ 28 callers
Function
check_cache_entries
src/cache_tests/utils.h:17
↓ 8 callers
Function
alloc_entry
* Allocate a cache entry */
src/cache.c:10
↓ 7 callers
Function
cache_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 callers
Function
check_strings
src/cache_tests/utils.h:6
↓ 5 callers
Function
cache_get
* Retrieve an entry from the cache */
src/cache.c:133
↓ 4 callers
Function
cache_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 callers
Function
cache_free
src/cache.c:99
↓ 2 callers
Function
add_entry_count
* Change the entry count, maintain load metrics */
src/hashtable.c:64
↓ 2 callers
Function
free_entry
* Deallocate a cache entry */
src/cache.c:20
↓ 2 callers
Function
hashtable_get
* Get from the hash table with a string key */
src/hashtable.c:197
↓ 2 callers
Function
llist_foreach
* For each item in the list run a function */
src/llist.c:197
↓ 1 callers
Function
file_free
* Frees memory allocated by file_load(). */
src/file.c:71
↓ 1 callers
Function
file_load
* Loads a file into memory and returns a pointer to the data. * * Buffer is not NUL-terminated. */
src/file.c:11
↓ 1 callers
Function
get_in_addr
* This gets an Internet address, either IPv4 or IPv6 * * Helper function to make printing easier. */
src/net.c:18
↓ 1 callers
Function
get_listener_socket
* Return the main listening socket * * Returns -1 or error */
src/net.c:32
↓ 1 callers
Function
handle_http_request
* Handle HTTP request and send response */
src/server.c:143
↓ 1 callers
Function
hashtable_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 callers
Function
hashtable_destroy
* Destroy a hashtable * * NOTE: does *not* free the data pointer */
src/hashtable.c:131
↓ 1 callers
Function
hashtable_get_bin
* Get from the hash table with a binary data key */
src/hashtable.c:205
↓ 1 callers
Function
hashtable_put_bin
* Put to hash table with a binary key */
src/hashtable.c:154
↓ 1 callers
Function
llist_append
* Append to the end of a list */
src/llist.c:62
↓ 1 callers
Function
llist_create
* Allocate a new linked list */
src/llist.c:12
↓ 1 callers
Function
llist_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 callers
Function
llist_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 callers
Function
llist_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 callers
Function
llist_insert
* Insert at the head of a linked list */
src/llist.c:42
↓ 1 callers
Function
mime_type_get
* Return a MIME type for a given filename */
src/mime.c:22
↓ 1 callers
Function
send_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 callers
Function
strlower
* Lowercase a string */
src/mime.c:10
Function
all_tests
src/cache_tests/cache_tests.c:149
Function
default_hashf
* Default modulo hashing function */
src/hashtable.c:73
Function
dllist_insert_head
* Insert a cache entry at the head of the linked list */
src/cache.c:30
Function
dllist_move_to_head
* Move a cache entry to the head of the list */
src/cache.c:47
Function
dllist_remove_tail
* Removes the tail from the list and returns it * * NOTE: does not deallocate the tail */
src/cache.c:74
Function
find_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
Function
foreach_callback
* Foreach callback function */
src/hashtable.c:263
Function
get_d20
* Send a /d20 endpoint response */
src/server.c:76
Function
get_file
* Read and return a file from disk or cache */
src/server.c:120
Function
hashtable_create
* Create a new hashtable */
src/hashtable.c:89
Function
hashtable_delete
* Delete from the hashtable by string key */
src/hashtable.c:225
Function
hashtable_foreach
* For-each element in the hashtable * * Note: elements are returned in effectively random order. */
src/hashtable.c:276
Function
hashtable_put
* Put to hash table with a string key */
src/hashtable.c:146
Function
htcmp
* Comparison function for hashtable entries */
src/hashtable.c:181
Function
htent_free
* Free an htent */
src/hashtable.c:119
Function
llist_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
Function
llist_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
Function
llist_count
* Return the number of elements in the list */
src/llist.c:189
Function
llist_head
* Return the first element in a list */
src/llist.c:92
Function
llist_tail
* Return the last element in a list */
src/llist.c:104
Function
main
* Main */
src/server.c:175
Function
resp_404
* Send a 404 response */
src/server.c:94
Function
test_cache_alloc_entry
src/cache_tests/cache_tests.c:28
Function
test_cache_create
src/cache_tests/cache_tests.c:8
Function
test_cache_get
src/cache_tests/cache_tests.c:103
Function
test_cache_put
src/cache_tests/cache_tests.c:48