#include <stdio.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <signal.h>
#include "libcomm.h"
#include <unistd.h>
Defines | |
#define | PORT 1235 |
Port on which the server is listening and the client trys to connect. More... | |
#define | bufsize 8192 |
How much random bytes should be transfered? More... | |
#define | threadid 1234 |
The ID which identifies the thread of the block_call() function. More... | |
Functions | |
main (int argc, char *argv[]) | |
test0001sockts: see test0001sockts.c. More... | |
client_test_program (char *server, int port, int auth) | |
test0001sockts: see test0001sockts.c, Client Test Programm. More... | |
block_call_do_test (int fd, int id, unsigned int type, char *buf, unsigned int size, int term) | |
testfunction which ist called from block_call() if a message/datablock has received. More... | |
block_call_term_test (int fd, int id) | |
testfunction which ist called from block_call() if a the connection terminates. More... | |
socket_accept_do_test (int fd, int id, char *pip, struct sockaddr_in their_addr, int term) | |
testfunction which ist called from socket_accept() if someone has connected. More... | |
server_test_program (int port, int mode) | |
test0001sockts: see test0001sockts.c, Server Test Programm. More... |
|
How much random bytes should be transfered?
|
|
Port on which the server is listening and the client trys to connect.
|
|
The ID which identifies the thread of the block_call() function. This value can be coosen arbitrary and is passwd to all called functions. |
|
testfunction which ist called from block_call() if a message/datablock has received.
|
|
testfunction which ist called from block_call() if a the connection terminates.
|
|
test0001sockts: see test0001sockts.c, Client Test Programm. The client test program generates a block of n*(bufsize) random bytes, sents theses bytes to the server, receive a block from server, invert it and compare it with generated block. BUGS: Receives only one block. If not all data ready and function resv() do noct block, data get lost. Test fails.
|
|
test0001sockts: see test0001sockts.c.
|
|
test0001sockts: see test0001sockts.c, Server Test Programm. The server test program binds a port and waits for connections. If someone connects it reads n*(bufsize) bytes, invert all bits of these bytes and send all back. BUGS: Receives only one block. If not all data ready and function resv() do noct block, data get lost. Test fails.
|
|
testfunction which ist called from socket_accept() if someone has connected.
|