Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
lectus is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon11.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Again ReadMemoryBarrier() etc
Next Topic: Threading example for U++
Goto Forum:
  


Current Time: Wed May 15 15:45:56 CEST 2024

Total time taken to generate the page: 0.02705 seconds