12345678910111213141516171819202122232425262728 |
- #ifndef CLIENT_H
- #define CLIENT_H
- #include <pthread.h>
- #include "Stream.h"
- typedef struct Client
- {
- short port;
- int socket;
-
- pthread_t thread;
-
- ClientStreamFunction handler;
- } 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
|