小编Yos*_*lon的帖子

套接字 - 在c中发送一个大字符串

我试图理解为什么我的函数dosnt发送所有字符串(它只从365568发送53576元素:这是我在客户端使用的函数:

#define DATASIZEBUFFER 4000// 365568
void DieWithError(char *errorMessage);/* Error handling function */


void TcpClient ( char *servIP , unsigned short echoServPort , Hash_t *HashData)//(int argc, char *argv[])
{
int sock;                           //Socket descriptor 
struct sockaddr_in ServAddr;    //Echo server address            
int bytesRcvd, totalBytesRcvd;      //Bytes read in single recv()
                                    //and total bytes read      

// Create a reliable, stream socket using TCP 
if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
    DieWithError(" socket () failed") ;

// Construct the server address structure 
memset(&ServAddr, 0, sizeof(ServAddr)); …
Run Code Online (Sandbox Code Playgroud)

c sockets

1
推荐指数
1
解决办法
616
查看次数

运行cuda套接字程序

我想创建一个直接连接到gpu的套接字.我想将数据从服务器发送到gpu,而无需花费从主机到设备的复制/移动时间.可能吗?

c sockets cuda

1
推荐指数
1
解决办法
296
查看次数

标签 统计

c ×2

sockets ×2

cuda ×1