> Excellent, that's an elegant solution. Thanks! Is it possible to read > one or more values from the beginning of the packet normally, then read > the remaining data into a single string? Something like this: > > Public Sub UDP_Read() > > Dim id As Byte > Dim type As Byte > Dim data As String > > Read #udp, id As Byte > Read #udp, type As Byte > Read #udp, data, Lof(udp) - 2 > > End > > If this works (and I don't see why it wouldn't), then everything is > fixed. I can have a transaction array that can store any transaction > type by saving the "payload" as a string and decoding it later with the > *@() functions.
You should better decode the packet directly with READ instructions. And beware that the READ syntax has changed in Gambas 3. Look at the documentation! Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user