"Harold P. Boushell" wrote:

> If the PowerBasic code works, I will add

> my FLEXHASH.EXE to it.  Your aware UDP

> is fast but in accurate, that is the

> application is responsible for re-assembly

> of the packets.

> 

> You never responded to the money issue

> for the PowerBasicCC compiler problem.

> 

> If move as fast as we can it will still

> take 3 - 4 months to get an INC up and

> running.  We still need a check list

> for user POSITIVE ID.  In the USA that

> would be showing of your driver's license.

> I understand that in Europe things are

> done differently, (Justus of the peace),

> or attorney etc.  How do "WE" (MesonAI.com)

> establish positive ID.  There should be

> advantages to incorporation in Canada and

> Slovenia and in USA.



> Jure I can not handle *.zip files.



I will send it to you in a seperate post.



> Send PowerBasic  code in *.txt  format.



This PowerBasic code can talk trough UDP but it's function is not

indentical to the UDP Console's.

--- Begin quote ---

'PB/DLL 6.0 code

#COMPILE DLL



FUNCTION dip$(ip&) ' convert a LONG into a dotted IP string

    DIM x AS BYTE PTR



    x = VARPTR(ip&)

    FUNCTION = FORMAT$(@x) + "." + FORMAT$(@x[1]) + "." +

FORMAT$(@x[2]) + "." + FORMAT$(@x[3])

END FUNCTION





FUNCTION ListenUDP(BYVAL iPort AS LONG) EXPORT AS STRING

    DIM hUdp&, buffer$, ipvar&, ipport&

    

    hUdp& = FREEFILE

    UDP OPEN PORT oPort AS hUdp& TIMEOUT 60

    IF ERR THEN EXIT FUNCTION

    DO

        ERRCLEAR

        buffer$ = ""

        UDP RECV #hUdp&, FROM ipvar&, ipport&, buffer$

        IF ISFALSE ERR THEN

            FUNCTION = "Received from " + dip$(ipvar&)  + ":" + _

                FORMAT$(ipport&) + "  ->  " + buffer$ 

            UDP SEND #hUdp&, AT ipvar&, ipport&, "Got it ok!"

            SLEEP 10

            EXIT LOOP

        ELSEIF ERR = 24 THEN

            FUNCTION = "Timeout!"

            EXIT LOOP

        END IF

    LOOP 

    CLOSE hUdp&

END FUNCTION



Dead simple!!!  It will compile to something like 10 or 12Kb, and

requires no other DLL's (except Winsock 2.0 must be installed).



In VB, you declare the DLL somthing like this:



DECLARE FUNCTION ListenUDP LIB "dllname.dll" ALIAS "LISTENUDP" (BYVAL

iPort AS LONG) AS STRING



And call it like this:



A$ = ListenUDP(10001&)

---- End quote ----





> I still need  BOX FLOW CHART OF YOUR WORK.



A what? =] Sorry I don't find that comprehensable.



--



Don't feel bad about asking/telling me anything, I will always gladly

reply.



Digging for info? Try AI Meta Search:

Http://WWW.AIMetaSearch.Com



GTSC4 -- If nobody else wants to do it, why shouldn't we?(TM)

Meson & GTSC4 are now merged:

Http://WWW.MesonAI.Com

