This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Unable to Accept TCP Connection
- From: R0b0t1 <r030t1 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 21 Apr 2018 21:11:15 -0500
- Subject: Re: Unable to Accept TCP Connection
- References: <CAAD4mYhyXBBej07EH0ai0cx11Vd4USGJk=+auBy3eOrroQFHgw@mail.gmail.com> <6ed83f54-401c-6f2f-83bf-9998323519d3@maxrnd.com>
On Sat, Apr 21, 2018 at 6:20 PM, Mark Geisert <mark@maxrnd.com> wrote:
> R0b0t1 wrote:
>>
>> The following never prints "Hello, world!"
>>
>>
>> struct sboot_state {
>> struct sockaddr_in haddr;
>> struct sockaddr caddr;
>> socklen_t clen;
>> int sfd, cfd;
>> } state = { 0 };
>>
>> state.haddr.sin_family = AF_INET;
>> state.haddr.sin_port = 2200;
>
>
> You can use the Windows 'netstat' to see listening connections. See if your
> app shows up on port 2200. But I suspect you need an htons(2200) on the
> assignment to sin_port.
>
Thanks, I thought something was missing. Wasn't sure what.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple