我试图理解为什么我的函数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) 我想创建一个直接连接到gpu的套接字.我想将数据从服务器发送到gpu,而无需花费从主机到设备的复制/移动时间.可能吗?