blob: cde64a542d8e5a3d3e0014bdc5559b4606a763a4 [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 Mehatd7680662009-05-12 11:16:59 -070018 int sendMsg(int code, char *msg, bool addErrno);
San Mehatfa644ff2009-05-08 11:15:53 -070019 int sendMsg(char *msg);
San Mehatfa644ff2009-05-08 11:15:53 -070020};
21
22typedef android::List<SocketClient *> SocketClientCollection;
23#endif