c common functions library extracted from my open source project FastDFS. this library is very simple and stable. functions including: string, logger, chain, hash, socket, ini file reader, base64 encode / decode, url encode / decode, fast timer, skiplist, object pool etc. detail info please see the c header files.
 
 
 
 
Go to file
YuQing f6f664b33d call getFileContentEx with offset constant 2026-07-22 15:34:16 +08:00
debian gh actions: upgrade to 1.0.83-1 2025-11-23 10:47:37 +00:00
doc doc/ini_file_reader-Chinese.md beautify 2026-07-15 11:55:03 +08:00
php-fastcommon INSTALL changed for V1.0.85 2026-06-23 15:59:56 +08:00
src call getFileContentEx with offset constant 2026-07-22 15:34:16 +08:00
.gitignore struct fast_task_info add fields: is_client and op_type for io_uring 2025-10-03 10:18:25 +08:00
HISTORY ini_file_readers can refer env variable as %{env::XXX} 2026-07-10 19:45:08 +08:00
INSTALL upgrade version to 1.0.86 2026-06-30 09:51:38 +08:00
LICENSE modify license to LGPLv3 and copyright 2020-10-14 11:03:46 +08:00
README.md README.md small changes 2026-07-11 09:21:27 +08:00
libfastcommon.spec upgrade version to 1.0.87 2026-07-14 08:30:01 +08:00
make.sh INSTALL changed for v1.0.81 2025-10-30 15:38:27 +08:00

README.md

c common functions library extracted from my open source projects FastDFS and FastDHT. this library is very simple and stable.

some functions are wrappered into php extension, such as fastcommon_gethostaddrs, fastcommon_id_generator_xxx, fastcommon_get_ifconfigs, fastcommon_get_sysinfo etc.

C function including:

logger: [logger.h] asynchronously sync to disk for high performance, thread safe, log rotate, auto delete old log files, compress log file etc.

ini file reader: [ini_file_reader.h] support sections marked by [SectionName], support a config item ocurs multiple times for multiple values, such as:

    tracker_server = ip1
    tracker_server = ip2
  #include directive to include other ini file
  #@function directive for annotation
  #@set directive to set variables for condition of #@if directive
  support control statements for special purpose as:
    #@if, #@else, #@endif, #@for, #@endfor

for more detail, please see ini file reader guide

id generator: [id_generator.h] generate unique 64 bits integer ID for multi processes. for more detail, please see id generator description

string operation: [shared_func.h] uppercase, lowercase, trim etc.

base64 encode / decode: [base64.h] for standard base64 or variable base64

url encode / decode: [shared_func.h]

md5 encode: [md5.h]

hash: [hash.h] hash table

chain: [chain.h] singly linked list

blocked queue: [fast_blocked_queue.h]

avl tree: [avl_tree.h] AVL tree

skiplist: [skiplist.h] [flat_skiplist.h] [multi_skiplist.h] flat skiplist and multi skiplist

socket: [sockopt.h] socket wrapper for connect, recv, send etc. support IPv6

ioevent: [ioevent.h] [ioevent_loop.h] like epoll (support Linux, FreeBSD and SunOS),

io buffer management: [fast_task_queue.h] for network io buffer

memory pool: [fast_mpool.h]

object based allocator: [fast_mblock.h]

connection pool: [connection_pool.h]

time wheel based timer: [fast_timer.h] for network timeout management, very high performance

local ip functions: [local_ip_func.h] get local ipv4 addresses

system info functions: [system_info.h] get cpu count, memory size, system load, mounted filesystems and processes info etc.

process control: [process_ctrl.h] for process start/stop/restart control

task schedule: [sched_thread.h] task shedule management/thead for repeat tasks

char convert: [char_converter.h] and [char_convert_loader.h] for fast char convert

more detail info please see the c header files.