Skip to content

Instantly share code, notes, and snippets.

@jonm
Last active October 4, 2015 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonm/7ebf8395c32345fab5f8 to your computer and use it in GitHub Desktop.
Save jonm/7ebf8395c32345fab5f8 to your computer and use it in GitHub Desktop.
the `close_socket_fd` function
int close_socket_fd( int desc)
{
struct descriptor_data *d;
extern struct descriptor_data *descriptor_list;
for (d = descriptor_list;d;d=d->next) {
if (d->descriptor == desc) {
close_socket(d);
}
}
}
/* This is an excerpt from a DikuMUD-derived codebase. DikuMUD was created by Sebastian Hammer, Michael Seifert</a>,
Hans Henrik Stærfeldt, Tom Madsen, and Katja Nyboe. This code is subject to the DikuMud License, as found at
https://github.com/jonm/SillyMUD/blob/43344e6dc864de7518c2fc0dbf7b7cf14f5924a2/doc/license.doc
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment