Re: Winsock connect issues
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 14:26:06 +0200
netstat is good helper in such cases
Arkady
"Nick" <nospam@xxxxxxxxxxxxx> wrote in message
news:%23eUWcYgZFHA.2884@xxxxxxxxxxxxxxxxxxxxxxx
> DOH!, just found the error, my port variable was not being set correctly!
> Typical, sit there for a few hours trying to get it working and the second
> I ask for help i find the problem!! Oh dear!
>
> Nick.
>
> "Nick" <nospam@xxxxxxxxxxxxx> wrote in message
> news:%234CXdUgZFHA.3712@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi there,
>>
>> I'm having great difficulty establishing a simple connection to
>> anything using winsock. As far as i can see my code is pretty straight
>> forward and correct, firstly I call WSAStartup, which returns success,
>> then create the socket by calling socket, which also returns success, i
>> then set the end point details as follows,
>>
>> cSAIEndPoint.sin_family = AF_INET;
>> cSAIEndPoint.sin_addr.s_addr = inet_addr("192.43.244.18");
>> cSAIEndPoint.sin_port = htons(37);
>> cBlnConnected = connect(cSocSocket,(SOCKADDR*)&cSAIEndPoint,
>> sizeof(cSAIEndPoint))!=SOCKET_ERROR;
>>
>> Unfortunately the application sits at connect for about 10 seconds
>> before returning a socket error of 10060 (Connection timeout). I can
>> connect to this address using Hyperterminal perfectly, it's time.nist.gov
>> for obtaining time information. I've also tried google on port 80 with
>> exactly the same failure. Nothing else is happening in the application
>> other than what was mentioned and no other errors encountered.
>>
>> Any ideas?? Thanks *loads* in advance for any help!!
>>
>> --
>> Nick Pateman
>>
>> ---------------------------------------------------------------
>> Any views expressed above are my own
>> Without predjudice
>>
>
>
.
- Prev by Date: Re: DHCP Callout API Get Hostname
- Next by Date: Re: getting WSAECONNABORTED on recv() on Windows XP installations
- Previous by thread: RasSetEntryProperties ErrorCode 8
- Next by thread: Net Send Command
- Index(es):
Relevant Pages
|