| | |
| | | } |
| | | |
| | | void server(int port) { |
| | | void *socket = dgram_mod_open_socket(REQ_REP); |
| | | void *socket = dgram_mod_open_socket(); |
| | | dgram_mod_bind(socket, port); |
| | | initThreadPool(socket); |
| | | |
| | |
| | | } |
| | | |
| | | void client(int port) { |
| | | void *socket = dgram_mod_open_socket(REQ_REP); |
| | | void *socket = dgram_mod_open_socket(); |
| | | int size; |
| | | void *recvbuf; |
| | | char sendbuf[512]; |
| | |
| | | char sendbuf[512]; |
| | | int scale = 100000; |
| | | int i; |
| | | void *socket = dgram_mod_open_socket(REQ_REP); |
| | | void *socket = dgram_mod_open_socket(); |
| | | |
| | | char filename[512]; |
| | | sprintf(filename, "test%d.txt", targ->id); |
| | | sprintf(filename, "test%d.tmp", targ->id); |
| | | FILE *fp = NULL; |
| | | fp = fopen(filename, "w+"); |
| | | |