Hello
I have been stuck on this issue for two days now. I hope one of you clever people can help!
I am trying to use Asyncstreams in b4a with a server written in c# (based on the example code). My aim is to have an app on the android device that takes an image and then sends it to the PC to be displayed.
I have the b4a app connecting to PC successfully, but the file fails to be recieved on the PC.
I thought this might be my implementation, so I went back to the file transfer example, and the c# desktop example posted. To my surprise this fails in the same way.
What happens is this:
I put the IP address of my Nexus 4 in the desktop transfer app, click connect and "Connected" shows on the Nexus 4.
I then click on the "Choose file" on the nexus4 filetransfer app, (which had another bug, the content chooser was returning a blank name, so I hard coded it to always send an existing image). The counter displays the correct filesize and image name on the phone, and appears to send. On the PC c# file transfer app, I get nothing. No errors, no messages. No file seems to be created on the PC, so I can only assume it is not sending the data from the b4a filetransfer app.
If i forcefully close the b4a filetransfer app, the client c# app log window says this:
Receiving: testpic.jpg���� <----- those weird chars actually show up like that
Unable to read beyond the end of the stream.
Can anyone give any advice on what the problem might be? it almost seems like the data is buffered until I forcefully close the socket and then it wakes up.
I have another related question and that is, when you use writestream to send a block of data, will it just keep trying to send all of it (say its a 25MB file) Or is there some limit on the amount of data that can be sent in one "chunk"? - does TCP take care of "chunking" ?
I have been stuck on this issue for two days now. I hope one of you clever people can help!
I am trying to use Asyncstreams in b4a with a server written in c# (based on the example code). My aim is to have an app on the android device that takes an image and then sends it to the PC to be displayed.
I have the b4a app connecting to PC successfully, but the file fails to be recieved on the PC.
I thought this might be my implementation, so I went back to the file transfer example, and the c# desktop example posted. To my surprise this fails in the same way.
What happens is this:
I put the IP address of my Nexus 4 in the desktop transfer app, click connect and "Connected" shows on the Nexus 4.
I then click on the "Choose file" on the nexus4 filetransfer app, (which had another bug, the content chooser was returning a blank name, so I hard coded it to always send an existing image). The counter displays the correct filesize and image name on the phone, and appears to send. On the PC c# file transfer app, I get nothing. No errors, no messages. No file seems to be created on the PC, so I can only assume it is not sending the data from the b4a filetransfer app.
If i forcefully close the b4a filetransfer app, the client c# app log window says this:
Receiving: testpic.jpg���� <----- those weird chars actually show up like that
Unable to read beyond the end of the stream.
Can anyone give any advice on what the problem might be? it almost seems like the data is buffered until I forcefully close the socket and then it wakes up.
I have another related question and that is, when you use writestream to send a block of data, will it just keep trying to send all of it (say its a 25MB file) Or is there some limit on the amount of data that can be sent in one "chunk"? - does TCP take care of "chunking" ?