⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socket.h

📁 dtelent是开源的开发项目
💻 H
字号:
/* socket.h
 * Copyright (c) 1997 David Cole
 *
 * Handle the WINSOCK connection to server
 */
#ifndef __socket_h
#define __socket_h

#include <winsock.h>

/* Return whether or not we have a connection to the remote end */
BOOL socketConnected(void);
/* Return whether or not we are offline and idle */
BOOL socketOffline(void);
/* Close the connection to the server */
void socketDisconnect(void);

/* Perform any network communication that is pending */
void socketProcessPending(void);
/* Return whether or not we are performing local flow control */
BOOL socketLocalFlowControl(void);
/* Set local flow control on or off */
void socketSetLocalFlowControl(BOOL local);
/* Stop or restart flow locally */
void socketSetFlowStop(BOOL stop);
/* Return whether or not flow has been stopped locally */
BOOL socketFlowStopped(void);
/* Report a socket error to the user */
void socketError(const char* operation, int error);

/* Display the current communications state in the status bar */
void socketShowStatus(void);
/* Return the remote host passed into socketConnect() */
char* socketGetHost(void);
/* Return the remote service passed into socketConnect() */
char* socketGetPort(void);
/* Return the handle of the socket */
SOCKET socketGetHandle(void);

/* Initiate a connection to the remote end */
void socketConnect(const char* host, const char* service);
/* Queue some data to be written to the remote end. */
void socketWrite(const char* data, int len);

/* Return local IP-address as a string
 */
char *socketGetLocalIP(void);

/* Check for a local X-server */
BOOL socketHaveXServer (void);

/* Register the window class that will receive the socket messages */
BOOL socketInitClass(HINSTANCE instance);
/* Initialise WINSOCK */
BOOL socketInit(HINSTANCE instance);
/* Unregister with WINSOCK */
void socketCleanup(void);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -