d768066ef5
Signed-off-by: San Mehat <san@google.com>
23 lines
478 B
C++
23 lines
478 B
C++
#ifndef _SOCKET_CLIENT_H
|
|
#define _SOCKET_CLIENT_H
|
|
|
|
#include "../../../frameworks/base/include/utils/List.h"
|
|
|
|
#include <pthread.h>
|
|
|
|
class SocketClient {
|
|
int mSocket;
|
|
pthread_mutex_t mWriteMutex;
|
|
|
|
public:
|
|
SocketClient(int sock);
|
|
virtual ~SocketClient() {}
|
|
|
|
int getSocket() { return mSocket; }
|
|
|
|
int sendMsg(int code, char *msg, bool addErrno);
|
|
int sendMsg(char *msg);
|
|
};
|
|
|
|
typedef android::List<SocketClient *> SocketClientCollection;
|
|
#endif
|