diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
commit | b51469b41167fb86ae2059a15cf0475c53fdda7b (patch) | |
tree | fc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /java/src/IceInternal/TcpTransceiver.java | |
parent | Fixed (ICE-5695) - IceSSL: misleading exception (diff) | |
download | ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2 ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip |
Down with ant. From the gradle to the grave.
Diffstat (limited to 'java/src/IceInternal/TcpTransceiver.java')
-rw-r--r-- | java/src/IceInternal/TcpTransceiver.java | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/java/src/IceInternal/TcpTransceiver.java b/java/src/IceInternal/TcpTransceiver.java deleted file mode 100644 index 5e8d33fb672..00000000000 --- a/java/src/IceInternal/TcpTransceiver.java +++ /dev/null @@ -1,113 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package IceInternal; - -final class TcpTransceiver implements Transceiver -{ - @Override - public java.nio.channels.SelectableChannel fd() - { - assert(_stream != null); - return _stream.fd(); - } - - @Override - public int initialize(Buffer readBuffer, Buffer writeBuffer, Ice.Holder<Boolean> moreData) - { - return _stream.connect(readBuffer, writeBuffer); - } - - @Override - public int closing(boolean initiator, Ice.LocalException ex) - { - // If we are initiating the connection closure, wait for the peer - // to close the TCP/IP connection. Otherwise, close immediately. - return initiator ? SocketOperation.Read : SocketOperation.None; - } - - @Override - public void close() - { - _stream.close(); - } - - @Override - public EndpointI bind() - { - assert(false); - return null; - } - - @Override - public int write(Buffer buf) - { - return _stream.write(buf); - } - - @Override - public int read(Buffer buf, Ice.Holder<Boolean> moreData) - { - return _stream.read(buf); - } - - @Override - public String protocol() - { - return _instance.protocol(); - } - - @Override - public String toString() - { - return _stream.toString(); - } - - @Override - public String toDetailedString() - { - return toString(); - } - - @Override - public Ice.ConnectionInfo getInfo() - { - Ice.TCPConnectionInfo info = new Ice.TCPConnectionInfo(); - if(_stream.fd() != null) - { - java.net.Socket socket = _stream.fd().socket(); - info.localAddress = socket.getLocalAddress().getHostAddress(); - info.localPort = socket.getLocalPort(); - if(socket.getInetAddress() != null) - { - info.remoteAddress = socket.getInetAddress().getHostAddress(); - info.remotePort = socket.getPort(); - } - } - return info; - } - - @Override - public void checkSendSize(Buffer buf, int messageSizeMax) - { - if(buf.size() > messageSizeMax) - { - Ex.throwMemoryLimitException(buf.size(), messageSizeMax); - } - } - - TcpTransceiver(ProtocolInstance instance, StreamSocket stream) - { - _instance = instance; - _stream = stream; - } - - final private ProtocolInstance _instance; - final private StreamSocket _stream; -} |