基于c语言,网络编程,服务器接收客户端1的信息发送给客户端2

基于c语言,网络编程,服务器接收客户端1的信息发送给客户端2,第1张

char
buff2[102410];
int
receiveLen;
/调用accept函数,等待客户端的连接/
client_fd=accept(sockfd,(struct
sockaddr
)&client_sockaddr,&sin_size
/调用recv函数接收客户端的请求/
recvbytes=recv(client_fd,buf,BUFFER_SIZE,0)
typedef
int
(WINAPI
ICEPUB_TCPSENDANDRECEIVETEXT)(char
sendBuff,
int
sendBuffLen,char
recvBuff,int
recvMaxLen,char
serverIP,int
serverPort);
ICEPUB_TCPSENDANDRECEIVETEXT
icePub_tcpSendAndReceiveText
=
0;
HINSTANCE
hDLLDrv
=
LoadLibrary
("icePubDlldll");
if(hDLLDrv)
{
icePub_tcpSendAndReceiveText=(ICEPUB_TCPSENDANDRECEIVETEXT
)
GetProcAddress
(hDLLDrv,"icePub_tcpSendAndReceiveText");
}
if(icePub_tcpSendAndReceiveText)
receiveLen=icePub_tcpSendAndReceiveText(buf,recvbytes),buff2,102410,"19216812",8000);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox
(buff2);

不了解ET的,点击  >

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/10246221.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-06
下一篇 2023-05-06

发表评论

登录后才能评论

评论列表(0条)

保存