You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.4 KiB
C

2 years ago
/*****************************************************************************
* FileName : netport.h *
* Programmer : Li Liangchu *
* Writen at : 2004.07.21 *
* Version : *
* Description: base on net comm sports driver *
* Last modify: 2004.07.21 *
*****************************************************************************/
#ifndef __NET_PORT_H_ICL__
#define __NET_PORT_H_ICL__
#include "common.h"
BYTE CreateUdpSock(int *CommSock, DWORD NetPort, DWORD NetCommIpAddr);
BYTE CreateTcpServerSock(int *LiSock, DWORD NetPort);
BYTE CreateTcpClientSock(int *CommSock, DWORD NetPort, DWORD NetCommIpAddr);
// <20><><EFBFBD>ü<EFBFBD>ʱ֪<CAB1><D6AA>TCP<43><50><EFBFBD><EFBFBD><EFBFBD>ŵķ<C5B5>ʽ<EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ӵ<EFBFBD>socket<65><74><EFBFBD><EFBFBD>
//void set_keepalive(int fd, int keep_alive, int keep_idle, int keep_interval, int keep_count);
void OpenNetPort( int commid);
void CloseNetPort( int commid );
void CloseNetListenPort( int commid );
void UdpRecv(int commid, int fds, u_long ipaddr);
void UdpSend(int commid);
BOOL TcpRecv(int commid, int fds, u_long ipaddr);
void TcpSend(int commid);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿ڵĿͻ<C4BF><CDBB><EFBFBD>ip<69><70>ַ<EFBFBD><D6B7><EFBFBD>õĶ˿<C4B6>
void TcpAccept(int commid, int lisfds);
void PollAllPort(void);
#endif