123456789101112131415161718192021222324252627282930 |
- #ifndef CLIENT_H
- #define CLIENT_H
- #include <pthread.h>
- #include "Stream.h"
- typedef struct Client
- {
- short port;
- int socket;
-
- pthread_t thread;
-
- int hAmount;
- int hIndex;
- ClientStreamFunction* handlers;
- } Client;
- void clientInitDefaults(Client* c);
- int clientInit(Client* c, char* ip, short port);
- void clientRemove(Client* c);
- int clientReceive(Client* c, Stream* in);
- int clientSendData(Client* c, Stream* out);
- void clientRegisterHandler(Client* c, ClientStreamFunction f);
- #endif
|