Click here to Skip to main content
14,667,696 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
MemberHamid_RT7-Aug-06 20:34 
AnswerRe: How to resize application acoording to system resolution set? Pin
Naren Neelamegam7-Aug-06 21:05
MemberNaren Neelamegam7-Aug-06 21:05 
QuestionDisable tab control Pin
see me7-Aug-06 17:50
Membersee me7-Aug-06 17:50 
AnswerRe: Disable tab control Pin
Naveen7-Aug-06 18:54
MemberNaveen7-Aug-06 18:54 
AnswerRe: Disable tab control Pin
Parthi_Appu7-Aug-06 19:20
MemberParthi_Appu7-Aug-06 19:20 
QuestionUser Process Memory Pin
Manish K. Agarwal7-Aug-06 17:39
MemberManish 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
MemberRobert 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
MemberKiran Pinjala7-Aug-06 20:19 
GeneralRe: WinSock error with recv() function. Pin
Robert Palma Jr.8-Aug-06 6:30
MemberRobert Palma Jr.8-Aug-06 6:30 
Questionerror Pin
thathvamsi7-Aug-06 16:10
Memberthathvamsi7-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
MemberParthi_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
MemberParthi_Appu7-Aug-06 19:56 
AnswerRe: error Pin
Hamid_RT7-Aug-06 21:53
MemberHamid_RT7-Aug-06 21:53 
QuestionError in recv() Pin
wrjksdf7-Aug-06 15:48
Memberwrjksdf7-Aug-06 15:48 
AnswerRe: Error in recv() Pin
Robert Palma Jr.7-Aug-06 16:41
MemberRobert Palma Jr.7-Aug-06 16:41 
AnswerRe: Error in recv() Pin
wrjksdf7-Aug-06 16:58
Memberwrjksdf7-Aug-06 16:58 
GeneralRe: Error in recv() Pin
wrjksdf7-Aug-06 17:25
Memberwrjksdf7-Aug-06 17:25 
QuestionEditbox Right click problem Pin
LaHaHa7-Aug-06 14:41
MemberLaHaHa7-Aug-06 14:41 
AnswerRe: Editbox Right click problem Pin
valikac7-Aug-06 15:05
Membervalikac7-Aug-06 15:05 
GeneralRe: Editbox Right click problem Pin
LaHaHa7-Aug-06 15:57
MemberLaHaHa7-Aug-06 15:57 
GeneralRe: Editbox Right click problem Pin
_AnsHUMAN_ 7-Aug-06 17:27
Member_AnsHUMAN_ 7-Aug-06 17:27 
GeneralRe: Editbox Right click problem Pin
LaHaHa7-Aug-06 17:32
MemberLaHaHa7-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.