#include <ExtTCPSocketMap.h>
Public Member Functions | |
| virtual TCPSocket * | findSocketFor (IPvXAddress remoteAddress, int remotePort) |
| Member function to find the TCPSocket by the remote address and port. | |
| virtual TCPSocket * | findSocketFor (cMessage *msg) |
| Member function to find the TCPSocket by an incoming tcp message. | |
| virtual TCPSocket * | findSocketFor (int connId) |
| Member function to find the TCPSocket by a connection ID given. | |
Definition at line 30 of file ExtTCPSocketMap.h.
| TCPSocket * ExtTCPSocketMap::findSocketFor | ( | IPvXAddress | remoteAddress, | |
| int | remotePort | |||
| ) | [virtual] |
Member function to find the TCPSocket by the remote address and port.
| remoteAddress | IPvXAddress of the remote host | |
| remotePort | portnumber of the connection to connect with remote host |
Definition at line 26 of file ExtTCPSocketMap.cc.
Referenced by BaseTcpSupport::closeTcpConnection(), findSocketFor(), BaseTcpSupport::handleTCPMessage(), BaseTcpSupport::isAlreadyConnected(), BaseTcpSupport::sendTcpData(), BaseTcpSupport::socketDataArrived(), BaseTcpSupport::socketEstablished(), BaseTcpSupport::socketFailure(), and BaseTcpSupport::socketPeerClosed().
{
SocketMap::iterator i = socketMap.begin();
while (i != socketMap.end()) {
if (i->second->getRemoteAddress().equals(remoteAddress)) {
if (i->second->getRemotePort() == remotePort) {
return i->second;
}
}
i++;
}
return NULL;
}
| TCPSocket * ExtTCPSocketMap::findSocketFor | ( | int | connId | ) | [virtual] |
Member function to find the TCPSocket by a connection ID given.
| connId | integer ID of an connection |
Definition at line 40 of file ExtTCPSocketMap.cc.
{
SocketMap::iterator i = socketMap.find(connId);
ASSERT(i==socketMap.end() || i->first==i->second->getConnectionId());
return (i==socketMap.end()) ? NULL : i->second;
}
| virtual TCPSocket* ExtTCPSocketMap::findSocketFor | ( | cMessage * | msg | ) | [inline, virtual] |
Member function to find the TCPSocket by an incoming tcp message.
| msg | incoming TCP message |
Definition at line 50 of file ExtTCPSocketMap.h.
{return TCPSocketMap::findSocketFor(msg);};
1.7.1