-
Anonymous
Проблема с получением данных с использованием вызова recv () [дублировать]
Сообщение
Anonymous »
client.cpp < /p>
Код: Выделить всё
#include
#include
#include
#include
#include
#include
#include
using namespace std;
sockaddr_in dest;
char buffer[137846];
void set_dest(){
dest.sin_family = AF_INET;
dest.sin_port = htons(5678);
inet_pton(AF_INET,"192.168.1.9",&dest.sin_addr);
}
void ReadFile(){
int fd = open("/data/data/com.termux/files/home/storage/pictures/Whatsapp/UseThis.jpg",O_RDONLY);
int total_byte = read(fd,&buffer[0],sizeof(buffer)); //ambil seluruh byte stream
close(fd);
}
void sending(int sockfd){
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79692720/problem-with-receiving-data-using-recv-call[/url]
1751885780
Anonymous
client.cpp < /p>
[code]#include
#include
#include
#include
#include
#include
#include
using namespace std;
sockaddr_in dest;
char buffer[137846];
void set_dest(){
dest.sin_family = AF_INET;
dest.sin_port = htons(5678);
inet_pton(AF_INET,"192.168.1.9",&dest.sin_addr);
}
void ReadFile(){
int fd = open("/data/data/com.termux/files/home/storage/pictures/Whatsapp/UseThis.jpg",O_RDONLY);
int total_byte = read(fd,&buffer[0],sizeof(buffer)); //ambil seluruh byte stream
close(fd);
}
void sending(int sockfd){
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79692720/problem-with-receiving-data-using-recv-call[/url]