GLBasic forum

Main forum => GLBasic - en => Topic started by: Marmor on 2012-Aug-14

Title: idea for another data handling for the net command bytes (send/receive)
Post by: Marmor on 2012-Aug-14
Hmm maybe iam wrong but ...

At this time the Send and Received Data  are  stored in a String .
If you need a singel Byte from the String  you must write

rv% = SOCK_RECV(sock, msg$, 1024)
t= asc(mid$(msg$,2,1))

my idea is what you can store the data to an array  such like

dim msg[1024) as byte ???
rv% = SOCK_RECV(sock, msg[], 1024)
t= msg[2]

what do you think about ?






Title: Re: idea for another data handling for the net command bytes (send/receive)
Post by: MrTAToad on 2012-Aug-14
Personally, I would go for an allocated area of memory, but then Peek/Poke of various types would be needed :)
Title: Re: idea for another data handling for the net command bytes (send/receive)
Post by: Marmor on 2012-Aug-14
yea !
the need  peekbyte,peekint,peekword  ,peekbla  and peekblub !
i like the idea much more as mine

Title: Re: idea for another data handling for the net command bytes (send/receive)
Post by: Moebius on 2012-Aug-16
is there some simple way to get the address of the string data (for a DGStr) in INLINE code?
Title: Re: idea for another data handling for the net command bytes (send/receive)
Post by: matchy on 2012-Aug-16
Currently to send an array it is usually constructed with delimiter for splitstr. Is there a faster way to instantly copy (prob inline or like MEM2SPRITE) an array list to string (i guess as hex) as that is what can only be sent?
Title: Re: idea for another data handling for the net command bytes (send/receive)
Post by: Kitty Hello on 2012-Aug-20
Is the asc() versio too slow? It should be really fast. Din't use mid$!! The asc-function has an additional 2nd parameter.