Skip to content
Snippets Groups Projects
Select Git revision
  • c77039b2168d80f0d2a132519cc6f8f6ebd457ee
  • master default protected
  • replication_test
  • dev protected
  • release-1.10 protected
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • 485-fixity-checks
  • 530-various-schema-problems-with-subsets
  • release-1.7 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
  • v1.9.2 protected
  • v1.9.2-rc0 protected
41 results

service_ready

Blame
  • fanout.c 35.57 KiB
    /*
       A simple server in the internet domain using TCP
       MIT Licensed
    */
    
    #define _GNU_SOURCE
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <ctype.h>
    #include <sys/types.h>
    #include <pwd.h>
    #include <grp.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <errno.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netdb.h>
    #include <arpa/inet.h>
    #include <sys/stat.h>
    #include <netinet/in.h>
    #include <time.h>
    #include <getopt.h>
    #include <stdarg.h>
    #include <limits.h>
    #include <sys/resource.h>
    #include <errno.h>
    #include <sys/epoll.h>
    
    
    struct client
    {
        int fd;
        char *input_buffer;
        char *output_buffer;
        struct client *next;
        struct client *previous;
    };
    
    
    struct channel
    {
        char *name;
        struct channel *next;
        struct channel *previous;
        u_int subscription_count;
    };
    
    
    struct subscription
    {
        struct client *client;
        struct channel *channel;
        struct subscription *next;
        struct subscription *previous;
    };
    
    
    int is_numeric (char *str);
    int strcpos (const char *haystack, const char c);
    char *substr (const char *s, int start, int stop);
    void str_swap_free (char **target, char *source);
    char *str_append (char *target, const char *data);
    void clear_socket_buffer (int sock);
    void fanout_error (const char *msg);
    void fanout_debug (int level, const char *format, ...);
    char *getsocketpeername (int fd);