delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/07/07:05:38

Date: Tue, 7 Jan 1997 12:25:21 -0200
Message-Id: <1.5.4.16.19970107095251.38675568@dmeasc.rc.ipt.br>
Mime-Version: 1.0
To: markiv AT rangenet DOT com, "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>,
djgpp AT delorie DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: WinSock in Dos with WIn95

At 17:02 06/01/97 -0600, Dan Hedlund wrote:
>Alexander V. Lukyanov wrote:
>> 
>> > I don't know, I have to get connect and accept to work first.  Do you
>> > know where I can find any information on wsock.vxd?
>> 
>> I know little about winsock, but I programmed for unix sockets.
>> Can the problem with connect / accept be caused by reversed byte
>> order in port number? It is needed to use htons(port) as
>> the part of sockaddr. For this reason my own program worked
>> on Sparc (most significant byte first) bye did not on ix86.
>
>I'm used 0x0100007f.  This address worked fine when I called bind(). 
>The wsock vxd doesn't have a htons function.  It has the following
As a rule htons is implemented as a macro and not as a function. I suggest
you look in the pertinent include files that accompany the vxd.

>functions:
>
>Working		Failed		Not tested
>		* Error 0xffff			ACCEPT
>*						BIND
>*						CLOSESOCKET
>		* Error 0xffff			CONNECT
>*						GETPEERNAME
>*						GETSOCKNAME
>				*		GETSOCKOPT
>				*		IOCTLSOCKET
>*						LISTEN
>				*		RECV
>				*		SELECT_SETUP
>				*		SELECT_CLEANUP
>				*		ASYNC_SELECT
>				*		SEND
>				*		SETSOCKOPT
>				*		SHUTDOWN
>*						SOCKET
>
>				*		CREATE
>				*		CREATE_MULTIPLE
>				*		DESTROY
>				*		DESTROY_BY_SOCKET
>				*		DESTROY_BY_THREAD
>				*		SIGNAL
>				*		SIGNAL_ALL
>
>				*		CONTROL
>
>				*		REGISTER_POSTMSG
>
>				*		ARECV
>				*		ASEND
>
>When connecting, I first called Socket, then Connect.  I tried binding
>if before connect, but it didn't make any difference.  When accepting, I
>called Socket, Bind, Listen, then Accept.
>
>Also, after I connect to my ISP, bind worked when I gave it my correct
>INET address.  It didn't work when I gave it a dummy address.
>
>After I tried connecting, I called getpeername, and it returned with an
>error, but it did fill in the inet address corectly.  I've tried
>connecting to my ISP's http and ftp servers, and to a http server
>running on my computer using 127.0.0.1.
>
>Do you know anyone who has the Win95 DDK?  I think it might have some
>information about wsock.vxd.  The information I've gotten is from
>wsock.inc, a winsock refrence, and disassembling the vxd.
>
>Thanks, Dan
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-35221Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019