Re: Winsock connect issues



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
>>
>
>


.



Relevant Pages

  • Re: Winsock connect issues
    ... > then create the socket by calling socket, which also returns success, i ... > before returning a socket error of 10060 (Connection timeout). ... > Nick Pateman ...
    (microsoft.public.win32.programmer.networks)
  • Re: IOCP and WSASend
    ... success, only at GQCS... ... // close the socket and free all allocated resources ... > I'm using IOCP and WSASend to send data. ... > recieving message about sending complete of closed socket and error raised ...
    (microsoft.public.win32.programmer.networks)
  • Re: Help with /proc/net/tcp fields
    ... | /proc/net/tcp means, with little success. ... | on that socket, and when will ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Help with /proc/net/tcp fields
    ... /proc/net/tcp means, with little success. ... on that socket, and when will ... the end) I will be very grateful, and if someone could direct me to a ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)