~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/src/Ice/TcpConnector.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// **********************************************************************
2
2
//
3
 
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
4
4
//
5
5
// This copy of Ice is licensed to you under the terms described in the
6
6
// ICE_LICENSE file included in this distribution.
31
31
 
32
32
    try
33
33
    {
34
 
        SOCKET fd = createSocket(false, _addr.ss_family);
35
 
        setBlock(fd, false);
36
 
        setTcpBufSize(fd, _instance->initializationData().properties, _logger);
37
 
        bool connected = doConnect(fd, _addr);
38
 
        if(connected)
39
 
        {
40
 
            if(_traceLevels->network >= 1)
41
 
            {
42
 
                Trace out(_logger, _traceLevels->networkCat);
43
 
                out << "tcp connection established\n" << fdToString(fd);
44
 
            }
45
 
        }
46
 
        return new TcpTransceiver(_instance, fd, connected);
 
34
        TransceiverPtr transceiver = new TcpTransceiver(_instance, createSocket(false, _addr.ss_family), false);
 
35
        dynamic_cast<TcpTransceiver*>(transceiver.get())->connect(_addr);
 
36
        return transceiver;
47
37
    }
48
38
    catch(const Ice::LocalException& ex)
49
39
    {
59
49
Short
60
50
IceInternal::TcpConnector::type() const
61
51
{
62
 
    return TcpEndpointType;
 
52
    return TCPEndpointType;
63
53
}
64
54
 
65
55
string