📄 socketops.h
字号:
/*
* Multiplatform Async Network Library
* Copyright (c) 2007 Burlex
*
* SocketOps - wrapper for any specific socket operations that may be platform-dependant.
*
*/
#ifndef SOCKET_OPS_H
#define SOCKET_OPS_H
namespace SocketOps
{
// Create file descriptor for socket i/o operations.
SOCKET CreateTCPFileDescriptor();
// Disable blocking send/recv calls.
bool Nonblocking(SOCKET fd);
// Enable blocking send/recv calls.
bool Blocking(SOCKET fd);
// Disable nagle buffering algorithm
bool DisableBuffering(SOCKET fd);
// Enables nagle buffering algorithm
bool EnableBuffering(SOCKET fd);
// Set internal buffer size to socket.
bool SetRecvBufferSize(SOCKET fd, uint32 size);
// Set internal buffer size to socket.
bool SetSendBufferSize(SOCKET fd, uint32 size);
// Closes socket completely.
void CloseSocket(SOCKET fd);
// Sets SO_REUSEADDR
void ReuseAddr(SOCKET fd);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -