mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
d4be41a3ad
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
23 lines
716 B
C
23 lines
716 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
// Settings for the test runner.
|
|
struct settings {
|
|
// Print the msgpack object on test failure.
|
|
bool debug;
|
|
// Print all inputs and outputs to stderr.
|
|
bool trace;
|
|
// Write test sample files into test-inputs/. These files, one per test
|
|
// method, are used to seed the fuzzer.
|
|
bool collect_samples;
|
|
};
|
|
|
|
// Main loop communicating via read/write file descriptors. The two fds can be
|
|
// the same in case of a network socket.
|
|
int communicate(struct settings cfg, int read_fd, int write_fd);
|
|
|
|
// Open a TCP socket on the given port and start communicate().
|
|
uint32_t network_main(struct settings cfg, uint16_t port, unsigned int timeout);
|