Hi, 

I think I reported this quite a while ago but it still seems to be a problem 
... using READ to try to acquire less than the entire available buffer doesn't 
seem to work .. and if I read the entire buffer, there's no obvious way to 
break the packet down into it's constituent parts ... 

Anyone any ideas? 
(and anyone any idea where the other 24 bytes are going ??) 

PRIVATE $udp AS UdpSocket 

PUBLIC SUB _new() 

$udp = NEW UdpSocket AS "Socket" 
$udp.Bind(2000) 

END 

PUBLIC SUB Socket_Read() 

DIM cmd AS Byte 
DIM siz AS Long 

PRINT Lof($udp) 
READ #$udp, cmd, 1 
PRINT Lof($udp) 
'READ #$udp, siz, 8 <= generates error if uncommented 

END 

$shell> echo "R00000011Hello World 123" |nc -u localhost 2000 

25 
0 <=== "should be 24!" 



-- 
Managing Director, Encryptec Limited 
Tel: 0845 5082719, Mob: 0785 3305393 
Email: [EMAIL PROTECTED] 
Statements made are at all times subject to Encryptec's Terms and Conditions of 
Business, which are available upon request. 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to