/*
- * Transfer data over the net.
+ * net engine
+ *
+ * IO engine that reads/writes to/from sockets.
+ *
*/
#include <stdio.h>
#include <stdlib.h>
struct pollfd pfd;
int ret;
- fprintf(f_out, "fio: waiting for connection\n");
+ log_info("fio: waiting for connection\n");
/*
* Accept loop. poll for incoming events, accept them. Repeat until we
char *sep;
int ret;
- if (!td->total_file_size) {
+ if (!td->o.size) {
log_err("fio: need size= set\n");
return 1;
}
return 1;
}
- strcpy(buf, td->filename);
+ strcpy(buf, td->o.filename);
- sep = strchr(buf, ':');
+ sep = strchr(buf, '/');
if (!sep) {
- log_err("fio: bad network host:port <<%s>>\n", td->filename);
+ log_err("fio: bad network host/port <<%s>>\n", td->o.filename);
return 1;
}
if (ret)
return ret;
- td->io_size = td->total_file_size;
+ td->io_size = td->o.size;
td->total_io_size = td->io_size;
for_each_file(td, f, i) {
- f->file_size = td->total_file_size / td->nr_files;
+ f->file_size = td->o.size / td->o.nr_files;
f->real_file_size = f->file_size;
}