Hello every coder.
i want to know if it is possible to send data (text/char) over internet using c++ .
can i use winsock send function as i could see on msdn
winsock send is used to send data to the server, hence i started coding using winsock,
i was able to connect to the server and send some data.
send function returns length of data.
i wonder where the data is sent ?
how would i know that th edata is sendt to the server as i
want to save that data on server in some text file.
i think my concept is not clear towards the approach.
do i need a server script like some php etc. that i need to call after i connect .
please let me know right path from a rightious man.
int lLength = send(m_WinSocket, buff, (int)strlen(buff), 0);
if(lLength < (int)strlen(buff))
{
m_Error = ::WSAGetLastError();
return 0;
}
// shutdown the connection since no more data will be sent
if (shutdown(m_WinSocket, SD_SEND) == SOCKET_ERROR)
{
m_Error = WSAGetLastError();
closesocket(m_WinSocket);
WSACleanup();
}
return lLength;