Click here to Skip to main content
15,881,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMemory Leak Part II Pin
BarryPearlman25-Oct-09 4:45
BarryPearlman25-Oct-09 4:45 
AnswerRe: Memory Leak Part II Pin
Rajesh R Subramanian25-Oct-09 6:14
professionalRajesh R Subramanian25-Oct-09 6:14 
GeneralRe: Memory Leak Part II Pin
BarryPearlman25-Oct-09 14:09
BarryPearlman25-Oct-09 14:09 
GeneralRe: Memory Leak Part II Pin
Rajesh R Subramanian25-Oct-09 16:31
professionalRajesh R Subramanian25-Oct-09 16:31 
AnswerRe: Memory Leak Part II Pin
cmk25-Oct-09 7:01
cmk25-Oct-09 7:01 
QuestionWant to ask about recv() and sent() function in sockets. Pin
WindowsVsLinux25-Oct-09 2:33
WindowsVsLinux25-Oct-09 2:33 
AnswerRe: Want to ask about recv() and sent() function in sockets. Pin
Richard MacCutchan25-Oct-09 3:08
mveRichard MacCutchan25-Oct-09 3:08 
GeneralRe: Want to ask about recv() and sent() function in sockets. Pin
WindowsVsLinux25-Oct-09 3:27
WindowsVsLinux25-Oct-09 3:27 
Hi Richard MacCutchan,
Actually this code is inside on a long code.Only in that section there is no response from server.
client :
{
printf("\nEnter the string.");
gets(sent_to_client);
send(sock,sent_to_client,sizeof(sent_to_client),0);//it will be sent to server
Sleep(1000);
printf("String is %s\n",sent_to_client);
Sleep(500);
recv(sock,output_from_client,sizeof(output_from_client),0);//here it is received from server
Sleep(1000);
printf("\nreceived sucessfully:\n");
}


the output in client window is:Enter the string...
String is:
received sucessfully:
I think that is it the right way to call these functions in single function means should i use this type if(sent()== SOCKET_ERROR) or it is not necessary?
GeneralRe: Want to ask about recv() and sent() function in sockets. Pin
Richard MacCutchan25-Oct-09 3:59
mveRichard MacCutchan25-Oct-09 3:59 
GeneralRe: Want to ask about recv() and sent() function in sockets. Pin
WindowsVsLinux25-Oct-09 4:14
WindowsVsLinux25-Oct-09 4:14 
GeneralRe: Want to ask about recv() and sent() function in sockets. Pin
Richard MacCutchan25-Oct-09 5:53
mveRichard MacCutchan25-Oct-09 5:53 
GeneralRe: Want to ask about recv() and sent() function in sockets. Pin
hugewave25-Oct-09 6:44
hugewave25-Oct-09 6:44 
AnswerRe: Want to ask about recv() and sent() function in sockets. Pin
cmk25-Oct-09 6:51
cmk25-Oct-09 6:51 
QuestionRe: Want to ask about recv() and sent() function in sockets. Pin
David Crow26-Oct-09 3:55
David Crow26-Oct-09 3:55 
AnswerRe: Want to ask about recv() and sent() function in sockets. Pin
cmk26-Oct-09 6:52
cmk26-Oct-09 6:52 
AnswerRe: Want to ask about recv() and sent() function in sockets. Pin
Moak26-Oct-09 0:37
Moak26-Oct-09 0:37 
QuestionFont metric questions Pin
transoft24-Oct-09 9:34
transoft24-Oct-09 9:34 
AnswerRe: Font metric questions Pin
«_Superman_»24-Oct-09 9:37
professional«_Superman_»24-Oct-09 9:37 
GeneralRe: Font metric questions Pin
transoft24-Oct-09 9:49
transoft24-Oct-09 9:49 
GeneralRe: Font metric questions Pin
«_Superman_»24-Oct-09 9:53
professional«_Superman_»24-Oct-09 9:53 
GeneralRe: Font metric questions Pin
transoft24-Oct-09 10:22
transoft24-Oct-09 10:22 
GeneralRe: Font metric questions Pin
«_Superman_»24-Oct-09 10:26
professional«_Superman_»24-Oct-09 10:26 
AnswerRe: Font metric questions Pin
Richard MacCutchan24-Oct-09 22:54
mveRichard MacCutchan24-Oct-09 22:54 
GeneralRe: Font metric questions Pin
transoft25-Oct-09 4:01
transoft25-Oct-09 4:01 
GeneralRe: Font metric questions Pin
Richard MacCutchan25-Oct-09 6:03
mveRichard MacCutchan25-Oct-09 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.