Go to the documentation of this file.
49 #ifndef __DEV_NET_TCP_IFACE_HH__
50 #define __DEV_NET_TCP_IFACE_HH__
145 TCPIface(std::string server_name,
unsigned server_port,
146 unsigned dist_rank,
unsigned dist_size,
148 bool use_pseudo_op,
bool is_switch,
int num_nodes);
153 #endif // __DEV_NET_TCP_IFACE_HH__
The interface class to talk to peer gem5 processes.
void sendTCP(int sock, const void *buf, unsigned length)
Send out a message through a TCP stream socket.
bool recvTCP(int sock, void *buf, unsigned length)
Receive the next incoming message through a TCP stream socket.
bool anyislistening() const
bool recvHeader(Header &header) override
Receive a header (i.e.
uint64_t Tick
Tick count type.
static std::vector< int > sockRegistry
Storage for all opened sockets.
static std::vector< std::pair< NodeInfo, int > > nodes
TCPIface(std::string server_name, unsigned server_port, unsigned dist_rank, unsigned dist_size, Tick sync_start, Tick sync_repeat, EventManager *em, bool use_pseudo_op, bool is_switch, int num_nodes)
The ctor creates and connects the stream socket to the server.
void establishConnection()
DistHeaderPkt::Header Header
int sock
The stream socket to connect to the server.
void sendCmd(const Header &header) override
Send out a control command to the remote end.
void initTransport() override
Init hook for the underlaying transport.
std::shared_ptr< EthPacketData > EthPacketPtr
void sendPacket(const Header &header, const EthPacketPtr &packet) override
Send out a data packet to the remote end.
Compute node info and storage for the very first connection from each node (used by the switch)
void recvPacket(const Header &header, EthPacketPtr &packet) override
Receive a packet from the remote end.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17