#include <lib/base/ebase.h>
#include <lib/base/eerror.h>
-#include <lib/base/estring.h>
+#include <string>
#include <libsig_comp.h>
#include <lib/base/buffer.h>
int writebusy;
sockaddr_in serv_addr;
protected:
- eSocketNotifier *rsn;
+ ePtr<eSocketNotifier> rsn;
virtual void notifier(int);
public:
eSocket(eMainloop *ml);
eSocket(int socket, int issocket, eMainloop *ml);
~eSocket();
- int connectToHost(eString hostname, int port);
+ int connectToHost(std::string hostname, int port);
int getDescriptor();
int writeBlock(const char *data, unsigned int len);
int setSocket(int socketfd, int issocket, eMainloop *ml);
int readBlock(char *data, unsigned int maxlen);
int bytesAvailable();
bool canReadLine();
- eString readLine();
+ std::string readLine();
void close();
// flow control: start/stop data delivery into read buffer.
void enableRead();