blob: 469dd9d0895e7f403e0c4d54188f22e5502ce9ed [file] [log] [blame]
San Mehatfa644ff2009-05-08 11:15:53 -07001#ifndef _SOCKET_CLIENT_H
2#define _SOCKET_CLIENT_H
3
4#include "../../../frameworks/base/include/utils/List.h"
5
6#include <pthread.h>
7
8class SocketClient {
9 int mSocket;
10 pthread_mutex_t mWriteMutex;
11
12public:
13 SocketClient(int sock);
14 virtual ~SocketClient() {}
15
16 int getSocket() { return mSocket; }
17
San Mehatdb017542009-05-20 15:27:14 -070018 int sendMsg(int code, const char *msg, bool addErrno);
19 int sendMsg(const char *msg);
San Mehatfa644ff2009-05-08 11:15:53 -070020};
21
22typedef android::List<SocketClient *> SocketClientCollection;
23#endif