Alaska Software Inc. - Asinet and winsock
Username: Password:
AuthorTopic: Asinet and winsock
Jose Angel [GpaSoft SL]Asinet and winsock
on Wed, 17 Feb 2010 13:19:51 +0100
Hi,

I have a program in VB6 that works fine:

  Winsock1.Protocol = sckUDPProtocol
  Winsock1.LocalPort = 2001
  Winsock1.RemoteHost = "255.255.255.255"
  Winsock1.RemotePort = 2000
  Winsock1.Bind

  sAux = Chr$(5)

  Winsock1.SendData sAux

  Winsock1.Close

And I tried to make the same with Asinet, but i don't know to do this.
Anybody can help me?

Best regards

Jos Angel
Hubert BrandelRe: Asinet and winsock
on Sat, 13 Mar 2010 10:10:55 +0100
Am 17.02.2010 13:19, schrieb Jose Angel [GpaSoft SL]:
> Hi,
>
> I have a program in VB6 that works fine:
>
>    Winsock1.Protocol = sckUDPProtocol
>    Winsock1.LocalPort = 2001
>    Winsock1.RemoteHost = "255.255.255.255"
>    Winsock1.RemotePort = 2000
>    Winsock1.Bind
>
>    sAux = Chr$(5)
>
>    Winsock1.SendData sAux
>
>    Winsock1.Close
>
> And I tried to make the same with Asinet, but i don't know to do this.
> Anybody can help me?
>
> Best regards
>
> José Angel
>
>

Hi,

there is a example of socket data transfer:

d:\alaska\XPPW32\source\samples\ASINET

I got a Problem with stability ...
Normaly the SERVER.EXE will start and open the connections, but sometime 
shows a -1 as  nClientSocket ...
The CLIENT.EXE sometimes gets "refused connection", or "not enouth 
memory" ... but there is nothing more running on this PC (SERVER.EXE and 
some CLIENT.EXE). Normaly I can start 40 CLIENT.EXE without problems.

I thought I can use this function to replace shared DBF files, but
how could I trust it when it does what it wants ?

Is this normal for TCPIP socket connections ?
I should say that I have integrated a loop to get all data even on 
internet, out of Phils DBFSERVER code.

Does someone use those connections to handle data ?
José Angel [GpaSoft] Re: Asinet and winsock
on Tue, 22 Feb 2011 17:06:19 +0100
To fix, I tried to make this in xBase:

   nError := 0
   nSocket := SocketCreate( SOCK_DGRAM, 2001, , , @nError )

   SocketSetOption( nSocket, SO_BROADCAST, .T. )

   cEnvDat := Chr(5)

   SocketSendTo( nSocket, cEnvDat, , , {AF_INET,2000,4294967295}, @nError )
   SocketClose( nSocket )

But not successfully sent to the address 255.255.255.255 and port 2000. What 
is wrong?

Thanks.

José Angel (GpaSoft)



"Jose Angel [GpaSoft SL]" <news@gpasoft.com> escribió en el mensaje de 
noticias:891f779$6b334d54$4c579@news.alaska-software.com...
> Hi,
>
> I have a program in VB6 that works fine:
>
>  Winsock1.Protocol = sckUDPProtocol
>  Winsock1.LocalPort = 2001
>  Winsock1.RemoteHost = "255.255.255.255"
>  Winsock1.RemotePort = 2000
>  Winsock1.Bind
>
>  sAux = Chr$(5)
>
>  Winsock1.SendData sAux
>
>  Winsock1.Close
>
> And I tried to make the same with Asinet, but i don't know to do this.
> Anybody can help me?
>
> Best regards
>
> José Angel
>
>