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 » Problem using TcpSockets
Re: Problem using TcpSockets [message #42014 is a reply to message #42011] Tue, 11 February 2014 02:15 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
A testcase would be useful to see the problem.

"- 2st s.Accept(server) blocks the program"
I am curious how you do that.

Whenever the last return is called:
	return "y";
}
#endif

the connection is closed and then a new connection can be made.

If you are in a GetLine() loop then the connection is not broken so a new
	if(!s.Connect("127.0.0.1", 11811)) {
with the same address ("127.0.0.1" or whatever) will fail with an error saying that address is in use.

Servers are often set up to accept multiple connections so a different address could be opened. But a basic client with just one address can have only one connection for that address and cannot be opened more than once at the same time.

My thinking may be wrong but I think that is correct.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GuiMT compilation error on ubuntu12.04
Next Topic: [SOLVED] Unable to compile MT applications (weird assembler error with GCC on Linux i386 arch)
Goto Forum:
  


Current Time: Tue May 14 17:45:48 CEST 2024

Total time taken to generate the page: 0.03133 seconds