ID:1269963
 
Problem description:

I am using C# System.Net.Sockets to receive data from world.Export(). The problem is that when I try to decode the packet (in ANCII format) I do not get a valid string.

I read the packet format that has been posted a few times in the forum and it says starting at char(5?) is the ANCII format string to the end of the packet. Has anyone been able to get this to work, that could possibly point me in the correct direction?

Thanks!
Can you give us an example of the call to Export() you are making? Export() can do inter-world calls, and HTTP requests, so you could be doing either.
Hey there,

I am using Export() the following way:

world.Export("localhost:11000?m=This is a test")
Well I think actually, he's trying to send it BYOND world communication style, to a TCP port his C# app is listening on?
Correct, I have a socket open on port 11000 listening for connections. I can see the connection and then store the packet into a byte array. Then I attempt to use Encoding.ASCII.GetString to output the packet received from byte 5 end of bytes (as the packet format when it was decoded before was ascii after byte 4 to the end) but this just displays gibberish.
The string is encoded. Unfortunately, I don't have documentation to hand that describes the encoding strings undergo on the wire, only the encoding the DMB string data undergoes.
It's not the byte, it's the resulting string. All network communication is big-endian, by convention, and BYOND is not stranger in this regard either. If you hook up Wireshark to be the receiving end of an Export() request, you'll see that the String data you've put in DM is basically encoded so that it's not human-readable on the wire.