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++ Core » [BUG]TcpSocket::Connect return always true
[BUG]TcpSocket::Connect return always true [message #49783] Fri, 04 May 2018 11:57 Go to next message
omari is currently offline  omari
Messages: 265
Registered: March 2010
Experienced Member
Test case :
void TestTcpSocketConnect()
{
	TcpSocket soc;
	int port;
	if(soc.Connect("1.2.3.4", port)) // any ip and any port
	{
		ASSERT(false);
	}
}


Win7, MINGW/MINGWx64/MSBT17/MSBT17x64


regards
omari.
Re: [BUG]TcpSocket::Connect return always true [message #49802 is a reply to message #49783] Tue, 08 May 2018 15:42 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
omari wrote on Fri, 04 May 2018 11:57
Test case :
void TestTcpSocketConnect()
{
	TcpSocket soc;
	int port;
	if(soc.Connect("1.2.3.4", port)) // any ip and any port
	{
		ASSERT(false);
	}
}


Win7, MINGW/MINGWx64/MSBT17/MSBT17x64


If you read U++ docs, it says:

"Returns true when connection process is successfully started."

It is the nature of tcp/ip - things are async to some degree, so failure of connection can be reported as late as reading / writing.

Mirek
Previous Topic: Returning Tuple that contains Vector is not possible
Next Topic: MemFn() only offers void return types
Goto Forum:
  


Current Time: Fri Apr 26 01:30:19 CEST 2024

Total time taken to generate the page: 0.87787 seconds