idea for another data handling for the net command bytes (send/receive)

Previous topic - Next topic

Marmor

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 ?







MrTAToad

Personally, I would go for an allocated area of memory, but then Peek/Poke of various types would be needed :)

Marmor

yea !
the need  peekbyte,peekint,peekword  ,peekbla  and peekblub !
i like the idea much more as mine


Moebius

is there some simple way to get the address of the string data (for a DGStr) in INLINE code?
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary

matchy

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?

Kitty Hello

Is the asc() versio too slow? It should be really fast. Din't use mid$!! The asc-function has an additional 2nd parameter.