tcpuser.h

来自「在SCO UNIX制定界面程序 可根据文件配制菜单,而不必修改源程序,非常方便」· C头文件 代码 · 共 34 行

H
34
字号
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <setjmp.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/socket.h>
#include <netinet/in.h>

#define SUCC	0
#define FAIL	-1

struct Tcp_Error{
			unsigned char err_no;
};

struct Srv_Apply {
			unsigned char srv_id;
};

/* TCP/IP API Define */

extern int snd_file ( const int sock , char *filename , unsigned long offset);

extern int rcv_file ( const int sock , char *filename , unsigned short timeout);

extern int snd_str ( const int sock , char *sndstr , unsigned int  size);

extern int rcv_str ( const int sock , char *rcvstr , unsigned short timeout , unsigned int *size );

extern int init_lnk_to_srv (int *sock , char *srv_ip_addr , unsigned short srv_port,  unsigned char srv_id );

extern int hangup_lnk ( const int sock );

⌨️ 快捷键说明

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