| View previous topic :: View next topic |
| Author |
Message |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Thu Dec 13, 2007 7:07 pm Post subject: [DELPHI ya again] get String from ServerSocket |
|
|
hello,
Well I'm coding a chat with ServerSocket and ClientSocket.
But my problem is:
I'm sending a string from Listbox1.Text via SendBuf.
but if I want to pick up the string in a Listbox them all items will be in one line.
but if I pick it up and store it in a memo it also picks the linebreaks but not in the Listbox.
How can I pick and store the linebreaks in a Listbox?
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Thu Dec 13, 2007 7:10 pm Post subject: |
|
|
Send:
Read off a line, add a distinct character to it (~), read another line, add it on to the end of the last line, add the distinct character again, repeat.
Recieve:
Read off all till the first distinct character, add to ListBox, repeat.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Thu Dec 13, 2007 7:20 pm Post subject: |
|
|
Well this way is a good idea too.
But I want to use this way, I guy said I just used the false way to Recieve the string.
Or do you know how to send a TStrings list via Server/Client-Socket ? I've tried a lot ways, but none of them worked.
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Thu Dec 13, 2007 7:24 pm Post subject: |
|
|
Sorry, I don't program in Delphi. I can only give you a method of accomplishing it.
When in doubt, google it.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Thu Dec 13, 2007 7:26 pm Post subject: |
|
|
| Flyte wrote: | Sorry, I don't program in Delphi. I can only give you a method of accomplishing it.
When in doubt, google it. |
Well I just asked this question here because I can't wait for the answer in the Delphi-forum.
and hey DIDN'T YOU SAY YOU GOTTA GO SLEEP?
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Thu Dec 13, 2007 7:59 pm Post subject: |
|
|
| rEakW0n wrote: | | and hey DIDN'T YOU SAY YOU GOTTA GO SLEEP? |
I said I had to go for a while. But now I am on a different computer at another location in another dimension.
|
|
| Back to top |
|
 |
jongwee Moderator
Reputation: 0
Joined: 28 Jun 2006 Posts: 1388 Location: Singapore
|
Posted: Thu Dec 13, 2007 8:04 pm Post subject: |
|
|
Nice post count Flyte :p
_________________
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Fri Dec 14, 2007 6:07 am Post subject: |
|
|
| You should take the text from Listbox1.Items.Text.
|
|
| Back to top |
|
 |
|