|
Public Member Functions |
| MSocket (int type, MPNLBase *owner) |
virtual | ~MSocket () |
void | operator() () |
bool | IsInvalid () |
bool | Read (std::string &msg) |
bool | Read (std::string &ip, std::string &msg) |
virtual void | Stop () |
int | Send (const std::string &msg) |
unsigned long | SendStream () |
void | SetStream (std::iostream *s) |
int | SendTo (const std::string &ip, int port, const std::string &msg) |
MYSOCKET | GetS () const |
void | SetS (MYSOCKET s) |
bool | Listen (int port) |
bool | HasMsg () |
std::string | GetLocalIP () |
Public Attributes |
void * | Data |
MMode | Mode |
int | PrefixLen |
sockaddr_in | ServAddr |
| for UDP Send and SendTo
|
std::string | PeerIP |
std::string | LocalIP |
| local IP (testing)
|
int | PeerPort |
std::iostream * | Stream |
Protected Types |
typedef std::queue< std::string > | MMsgQueue |
Protected Member Functions |
void | PushMsg (const std::string &msg) |
| void SetActive(bool a) {
|
void | PushMsg (const std::string &ip, const std::string &msg) |
int | Send (const char *str, int len, int flags) |
Protected Attributes |
MYSOCKET | S |
int | Type |
MPNLBase * | Owner |
MMsgQueue | Messages |
MMsgQueue | IP |
TIME | LastMsgTime |
boost::mutex | MsgMutex |