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   |
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
|
|
|
Goto Forum:
Current Time: Wed Jul 16 08:39:24 CEST 2025
Total time taken to generate the page: 0.03171 seconds
|