communication.h

来自「rsh身份验证」· C头文件 代码 · 共 34 行

H
34
字号
/*****************************************************************
网络通信头文件:BigInt.h
作者:rockroby@gmail.com
版本:1.1 (2007.5.13)
说明:
*****************************************************************/

#include <windows.h>
#include <stdio.h>
#include <malloc.h>
#include <string.h>

#define SERVER_PORT 513
#define CLIENT_PORT 514
#define MAX_RQRS_LEN 1024

typedef struct {
	DWORD32 RqLen;	/* Total length of request, not including this field */
	CHAR Command;
	BYTE Record [MAX_RQRS_LEN];
} REQUEST;

typedef struct {
	DWORD32 RsLen;	/* Total length of response, not including this field */
	CHAR Status;
	BYTE Record [MAX_RQRS_LEN];
} RESPONSE;
//static BOOL SendRequestMessage (REQUEST *, SOCKET);
//static BOOL ReceiveResponseMessage (RESPONSE *, SOCKET);


int readn(SOCKET sd, LPBYTE pBuffer, LONG32 nRemainRecv);
int writen(SOCKET sd, LPBYTE pBuffer, LONG32 nRemainRecv);
SOCKET CommInit(char IPAddr[]);

⌨️ 快捷键说明

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