|
|
|
|||||
|
Question about souce codes "TcpEndpoint::acceptor"
hi,there,
In the TcpEndpoint.cpp file, AcceptorPtr IceInternal::TcpEndpoint::acceptor(EndpointPtr& endp) const { TcpAcceptor* p = new TcpAcceptor(_instance, _host, _port); ------------- ?????------------------------------------------- endp = new TcpEndpoint(_instance, _host, p->effectivePort(), _timeout, _compress); --------------------------------------------------------- return p; } I can't understand the lines with "new" . why need such codes? Consideration for reference number of smart pointer? sorry for this trivial question. Thanks in advance. |
|
|||||
|
hi, Benoit,
Sorry for my poor expression about my question. I mean, why need to allocate a new TcpEndpoint here? I traced into the code and found that the members of the new TcpEndpoint seem to have the same values as the one passed in by "EndpointPtr& endp" except the address and the ref. Why not use the original TcpEndoint in the accept() method ? There must be some thing out of my understanding. Hope getting your help. Best Regards---OrNot |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Don't "Ice-3.1.1-VC71.msi " include the "slice2java.exe"? | Jason Gao | Help Center | 4 | 10-26-2006 12:23 PM |
| Icepack registry "TimeOut" exception with heavy load | eaglecn | Help Center | 1 | 05-26-2006 01:02 AM |
| "Invalid UTF8 string" when transer chinese chars between cpp server and csharp client | raygo | Help Center | 8 | 03-21-2006 09:34 PM |
| Question about "Ice.MonitorConnections" | OrNot | Help Center | 2 | 07-21-2005 12:27 AM |
| Going from "in" to "out" param, using a class as a union | catalin | Help Center | 1 | 04-05-2004 09:55 AM |