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 » TcpSocket in Array
Re: TcpSocket in Array [message #37220 is a reply to message #37218] Thu, 06 September 2012 19:11 Go to previous messageGo to previous message
omari is currently offline  omari
Messages: 276
Registered: March 2010
Experienced Member

CONSOLE_APP_MAIN
{
	Array<TcpSocket> a;
	
	{	
		TcpSocket s;

                if(..)
                   a.Add() = s;
		
	}

}



Note: the destructor TCPSocket can cause problems.

if this is the case, I recomande the first solution:

CONSOLE_APP_MAIN
{
	Array<TcpSocket> a;
	
	{	
		TcpSocket& s = a.Add();

		if (! ..)
		   a.Remove(a.GetCount()-1);
		
	}

}


regards
omari.

[Updated on: Thu, 06 September 2012 19:35]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Skylark logs failure in accept()
Next Topic: TcpSocket Tutorials exist?
Goto Forum:
  


Current Time: Wed Jul 16 08:39:24 CEST 2025

Total time taken to generate the page: 0.03171 seconds