代码拉取完成,页面将自动刷新
同步操作将从 eclipser/socket 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* File: ServerSocket.h
* Author: Vicky.H
* Email: eclipser@163.com
*
* Created on 2014年2月26日, 下午8:43
*/
#ifndef CN_VICKY__SERVERSOCKET_H
#define CN_VICKY__SERVERSOCKET_H
#include "Socket.h"
class ServerSocket {
public:
// constructor
ServerSocket(unsigned int port, unsigned int backlog = 5);
// destructor
~ServerSocket();
public:
// close socket
void close();
// accept new connection
bool accept(Socket* socket);
// get/set socket's linger status
unsigned int getLinger() {
return m_Socket->getLinger();
}
void setLinger(unsigned int lingertime) {
m_Socket->setLinger(lingertime);
}
// get/set socket's nonblocking status
bool isNonBlocking() const {
return m_Socket->isNonBlocking();
}
void setNonBlocking(bool on = true) {
m_Socket->setNonBlocking(on);
}
// get/set receive buffer size
unsigned int getReceiveBufferSize() const {
return m_Socket->getReceiveBufferSize();
}
void setReceiveBufferSize(unsigned int size) {
m_Socket->setReceiveBufferSize(size);
}
// get/set send buffer size
unsigned int getSendBufferSize() const {
return m_Socket->getSendBufferSize();
}
void setSendBufferSize(unsigned int size) {
m_Socket->setSendBufferSize(size);
}
SOCKET getSOCKET() {
return m_Socket->getSOCKET();
}
protected:
// socket implementation object
Socket* m_Socket;
};
#endif /* CN_VICKY__SERVERSOCKET_H */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。