Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to resize application acoording to system resolution set? Pin
Hamid_RT7-Aug-06 20:34
Hamid_RT7-Aug-06 20:34 
AnswerRe: How to resize application acoording to system resolution set? Pin
Naren Neelamegam7-Aug-06 21:05
Naren Neelamegam7-Aug-06 21:05 
QuestionDisable tab control Pin
see me7-Aug-06 17:50
see me7-Aug-06 17:50 
AnswerRe: Disable tab control Pin
Naveen7-Aug-06 18:54
Naveen7-Aug-06 18:54 
AnswerRe: Disable tab control Pin
Parthi_Appu7-Aug-06 19:20
Parthi_Appu7-Aug-06 19:20 
QuestionUser Process Memory Pin
Manish K. Agarwal7-Aug-06 17:39
Manish K. Agarwal7-Aug-06 17:39 
AnswerRe: User Process Memory Pin
Michael Dunn7-Aug-06 19:57
sitebuilderMichael Dunn7-Aug-06 19:57 
QuestionWinSock error with recv() function. Pin
Robert Palma Jr.7-Aug-06 16:35
Robert Palma Jr.7-Aug-06 16:35 
Vis C/C++ 6.0, Visual Studio

My program is a client to read a web page.

I am successfully setting up the socket.
The following calls and assignments are successful

WSAStartup()
memset(&sa,0,sizeof(sa));
sa.sin_family = AF_INET;
gethostbyname(gipaddrname); // example yahoo.com
memcpy(&sa.sin_addr, phe->h_addr, phe->h_length);
sa.sin_port = portn; //port 80 converted to net order
getprotobyname("tcp");
socktype = SOCK_STREAM;
sockdes = socket(PF_INET, socktype, ppe->p_proto);
connect(sockdes, (struct sockaddr *)&sa, sizeof(sa));

But when I go to receive the Servers 'hello'
message with:

recv(sockdes, pbufbin, len, 0);

I get the error:
WSAECONNABORTED The virtual circuit was terminated due to a time-out or other failure. The application should close the socket as it is no longer usable.

The strange thing is that I have used this exact code for
other servers, such a pop3 mail servers and servers that I wrote, all without a problem....

Any help would be much appreciated Smile | :)

Many thanks,
Robert


AnswerRe: WinSock error with recv() function. Pin
Kiran Pinjala7-Aug-06 20:19
Kiran Pinjala7-Aug-06 20:19 
GeneralRe: WinSock error with recv() function. Pin
Robert Palma Jr.8-Aug-06 6:30
Robert Palma Jr.8-Aug-06 6:30 
Questionerror Pin
thathvamsi7-Aug-06 16:10
thathvamsi7-Aug-06 16:10 
AnswerRe: error Pin
kakan7-Aug-06 19:27
professionalkakan7-Aug-06 19:27 
AnswerRe: error [modified] Pin
Parthi_Appu7-Aug-06 19:42
Parthi_Appu7-Aug-06 19:42 
GeneralRe: error Pin
kakan7-Aug-06 19:49
professionalkakan7-Aug-06 19:49 
GeneralRe: error Pin
Parthi_Appu7-Aug-06 19:56
Parthi_Appu7-Aug-06 19:56 
AnswerRe: error Pin
Hamid_RT7-Aug-06 21:53
Hamid_RT7-Aug-06 21:53 
QuestionError in recv() Pin
wrjksdf7-Aug-06 15:48
wrjksdf7-Aug-06 15:48 
AnswerRe: Error in recv() Pin
Robert Palma Jr.7-Aug-06 16:41
Robert Palma Jr.7-Aug-06 16:41 
AnswerRe: Error in recv() Pin
wrjksdf7-Aug-06 16:58
wrjksdf7-Aug-06 16:58 
GeneralRe: Error in recv() Pin
wrjksdf7-Aug-06 17:25
wrjksdf7-Aug-06 17:25 
QuestionEditbox Right click problem Pin
LaHaHa7-Aug-06 14:41
LaHaHa7-Aug-06 14:41 
AnswerRe: Editbox Right click problem Pin
valikac7-Aug-06 15:05
valikac7-Aug-06 15:05 
GeneralRe: Editbox Right click problem Pin
LaHaHa7-Aug-06 15:57
LaHaHa7-Aug-06 15:57 
GeneralRe: Editbox Right click problem Pin
_AnsHUMAN_ 7-Aug-06 17:27
_AnsHUMAN_ 7-Aug-06 17:27 
GeneralRe: Editbox Right click problem Pin
LaHaHa7-Aug-06 17:32
LaHaHa7-Aug-06 17:32 

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.