This project is read-only.




Getting an error trying to cast a character to a byte. See image.

file attachments

Closed Jul 3, 2011 at 3:55 AM by juliusfriedman


juliusfriedman wrote Jun 27, 2011 at 4:55 PM

Thanks for the information, I was utilizing ArrayList and I am trying to get away from that by using ByteArrays which do not box.

Most likely this occurs when adding a int or char to the list and then trying to unbox it which should work..

Do you have a small server setup that I can test against? If not I will have to include something in the solution to allow testing of the protocol against the emulator from a webPage.

Thanks for the heads up!


juliusfriedman wrote Jun 27, 2011 at 4:56 PM

-- I may also decide to add a ByteArrayList so this is a little more verbose and doesn't use cast.

coolpablo wrote Jun 27, 2011 at 7:29 PM

I just added a public endpoint we can use for testing connections - please get latest. I'm still seeing a cast exception. I have a feeling this has something to do with the key generation. I wonder if using Guid.NewGuid() might be easier for this stuff?

wrote Jun 27, 2011 at 8:58 PM

coolpablo wrote Jun 27, 2011 at 8:58 PM

I've been testing the connection to pusher.. I finally got it to work (see attached image), however I had to hard code the keys to get it working. Now to figure out how to get the keys working..

coolpablo wrote Jun 28, 2011 at 1:28 AM

I've been trying to get this working with, but they seem to have some undocumented handshake sequence that happens within their javascript library... I'll continue to research other ways to host a WS server (this shouldn't be so hard :-()

juliusfriedman wrote Jun 28, 2011 at 4:37 AM

I think its because Type does not have a is assignable from that can be used but whatever... I posted a bug and fixed it in the latest sources... I already knew about it and now it came back to "byte" me so to speak!

Anyway thanks for the testing! The key generation is still not 100% yet but its closer than what it was for sure! I will have that working next!

Good Find and Good Commit!

juliusfriedman wrote Jun 28, 2011 at 7:02 AM

Added a big commit which seems to work for me! Unless you tell me otherwise I think are good to go to the next stage!

Hash is working fine!

I am thinking about adding JSON Encoding and Decoding Support!

coolpablo wrote Jun 28, 2011 at 3:48 PM

I did some minor refactoring to separate the contracts from the implementations, get latest and see commit comments.

coolpablo wrote Jun 28, 2011 at 4:59 PM

JSON encode/decode support would be awesome. It's a really light weight string based protocol that make sense for embedded devices. I noticed someone already doing encoding (but not decoding) here:

wrote Jul 3, 2011 at 3:55 AM

Resolved with changeset 80177.

wrote Feb 13, 2013 at 8:31 PM

wrote May 15, 2013 at 4:00 AM