Home » U++ Library support » U++ MT-multithreading and servers » Non-Blocking socket example
Re: Socket example? [message #11032 is a reply to message #10984] |
Wed, 15 August 2007 20:33 |
lectus
Messages: 329 Registered: September 2006 Location: Brazil
|
Senior Member |
|
|
fudadmin: Thanks! That was a good starting point.
I'm connecting to 4662 port using telnet to check the connection.
I try sock.Write("Welcome!\r\n") and String data sock.Read(Null, 250), for writing and reading strings, but it seems to not be working.
What's right way to read and write lines from/to the client?
ReadRaw() looks OK for files. What about strings with \n at the end?
Thanks!
I tried this:
void test::BtngetPush()
{
sock.Write("Welcome!\r\n");
String data = sock.ReadUntil('\n', Null, 1000000);
editdata <<= data;
}
While btnget is a button, that when clicked should executed that code. editdata is EditString control. But that is not working. =\
[Updated on: Wed, 15 August 2007 20:36] Report message to a moderator
|
|
|
|
|
Non-Blocking socket example
|
|
|
Re: Socket non block
By: lundman on Wed, 18 April 2007 09:33
|
|
|
Re: Socket non block
|
|
|
Socket example?
By: lectus on Thu, 09 August 2007 20:59
|
|
|
Re: Socket example?
By: bonami on Fri, 10 August 2007 04:55
|
|
|
Re: Socket example?
By: lectus on Fri, 10 August 2007 05:57
|
|
|
Re: Socket example?
By: bonami on Fri, 10 August 2007 08:16
|
|
|
Re: Socket example?
By: lectus on Mon, 13 August 2007 16:58
|
|
|
Re: Socket example?
By: fudadmin on Mon, 13 August 2007 18:34
|
|
|
Re: Socket example?
By: lectus on Mon, 13 August 2007 21:00
|
|
|
Re: Socket example?
By: fudadmin on Mon, 13 August 2007 22:52
|
|
|
Re: Socket example?
By: mezise on Mon, 13 August 2007 23:32
|
|
|
Re: Socket example?
By: lectus on Tue, 14 August 2007 04:06
|
|
|
Re: Socket example?
By: fudadmin on Wed, 15 August 2007 04:51
|
|
|
Re: Socket example?
|
|
|
Re: Socket example?
By: lectus on Wed, 15 August 2007 20:33
|
|
|
Re: Socket example?
By: fudadmin on Thu, 16 August 2007 08:12
|
|
|
Re: Socket example?
By: mirek on Fri, 17 August 2007 19:21
|
|
|
Re: Socket example?
By: fudadmin on Sun, 19 August 2007 14:23
|
|
|
Re: Socket example?
By: lectus on Sun, 19 August 2007 17:23
|
|
|
Re: Socket example?
By: fudadmin on Mon, 20 August 2007 01:58
|
|
|
Re: Socket example?
By: fudadmin on Mon, 20 August 2007 21:24
|
Goto Forum:
Current Time: Wed May 15 15:45:56 CEST 2024
Total time taken to generate the page: 0.02705 seconds
|