Android Tutorial Android Network Tutorial

Status
Not open for further replies.

MFX

Member
Licensed User
Longtime User
Thanks, that doesn't really get me much furthur though. :-(

Martin.
 

Gary Miyakawa

Active Member
Licensed User
Longtime User
Martin,

Send me a PM and I'll send you a really small Telnet pgm that I use as my "starter" program for telnet like apps...

Cheers,

GaryM
 

MFX

Member
Licensed User
Longtime User
Many thanks, PM on it's way. All I need is a "foot in the door".

Regards.
Martin.
 

schlossbauer

New Member
Licensed User
Longtime User
Transmit large data with buffer

Hello Erel,
I got a question according to your post with that server application example.
You wrote a function/routine which receives data over a buffer so that the data can be very large although the buffer is very small. There are lot of annoying things done in this dowhile-loop. Is it possible, (has basic4android the ability) to receive data just by doing something like calling a receive function, so that i dont have to care about all the buffer size- and file size- stuff like checking the size of the inputstream and counting the bytes, that are already received?
 

schlossbauer

New Member
Licensed User
Longtime User
Okay thanks a lot!
I just wrote my own serverapp in B4A and i built a client in C# and it works well.
But now i tried to build this client in B4A and it works while sending a small text (smaller as the buffer size) but can you post me an example how to transmit a text larger as the buffer? For example just some words in a string with a small buffer Dim buffer(2) As Byte?
That would be very helpful cause i dont know how to handle with the inputstream size and the code for piecewise filling/reading from the buffer.
Thanks a lot!
 

Wim213

New Member
Licensed User
Longtime User
Hi all,

I am a bit lost. Looking at this site for 2 days, I still find it difficult to use this library. What I am looking for is to connect to a server on another machine and be able to send and receive text through a TCP socket.

Unfortunantaly the examples I find are either a server to receive files, or a client that just receives info from a NTP server.

Where can I find the documentation that describes the events that can be fired ? In the examples I find the connected event, but once connected what is fired if you receive data on the socket ? Or do I use a timer and check every so often ? How can I send data through the outputstream method.

Thanks to anyone who can help me.

Wim.
 

hennemarc

Member
Licensed User
Longtime User
Hi Wim213,

this is exactly what I am looking for. Just sending a simple string to a TCP server. That's it. But so far I am fighting with the tutorial without success. Do you have meanwhile the information you needed? If yes, would you please share the outcome, so that I can profit from that?

Regards,

hennemarc
 

krsrn

Member
Licensed User
Longtime User
Help!

I m having difficulty getting the example to work. Although I have managed to get it on to my device. When I run the desktop Application I get errors - No Connection cpuld be made, the target machine actively refused it 127.0.0.1:5007.

Any help please?
 

krsrn

Member
Licensed User
Longtime User
Sorry Erel I m unsure of what you mean.

Do you mean within the coding execute the statement to connect to 127.0.0.1?
 

berder

New Member
Licensed User
Longtime User
hi. Please tell me what could be the problem and wrote a simple program for sending messages. android with a computer message comes, and when I try to send from your computer, the application for Android-locked with an unknown error.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…