G
Guest
I have a client socket connection (Linux) and a server socket connection
(Windows). All is fine with the sockets themselves.
The client-side is sending data (struct) to the server via write().
write(sockfd, &struct, sizeof(struct))
The server is receiving data via recv().
recv(clientfd, buf, sizeof(struct), 0)
Once data is received by the server, various verification checks are
performed via a 3rd-part app and the additional data is sent back to the
client, who writes the new data to a file.
I have been attempting to read the data being received, which is defined as
a char array ( char buf[sizeof(buf)]. Try as I might, I cannot seem to parse
this incoming data in any way as a string -- or struct, for that matter.
What am I doing wrong? Please!!!
I would gladly use the same socket functions as I have on Linux, but
read()/write() do not seem to be available in Windows. Or, at least I cannot
find them.
Please help me in resolving how I might convert this incoming stream of data
into structure elements.
(Windows). All is fine with the sockets themselves.
The client-side is sending data (struct) to the server via write().
write(sockfd, &struct, sizeof(struct))
The server is receiving data via recv().
recv(clientfd, buf, sizeof(struct), 0)
Once data is received by the server, various verification checks are
performed via a 3rd-part app and the additional data is sent back to the
client, who writes the new data to a file.
I have been attempting to read the data being received, which is defined as
a char array ( char buf[sizeof(buf)]. Try as I might, I cannot seem to parse
this incoming data in any way as a string -- or struct, for that matter.
What am I doing wrong? Please!!!
I would gladly use the same socket functions as I have on Linux, but
read()/write() do not seem to be available in Windows. Or, at least I cannot
find them.
Please help me in resolving how I might convert this incoming stream of data
into structure elements.