49#ifndef __DEV_NET_TCP_IFACE_HH__
50#define __DEV_NET_TCP_IFACE_HH__
105 sendTCP(
int sock,
const void *buf,
unsigned length);
114 bool recvTCP(
int sock,
void *buf,
unsigned length);
148 TCPIface(std::string server_name,
unsigned server_port,
149 unsigned dist_rank,
unsigned dist_size,
151 bool use_pseudo_op,
bool is_switch,
int num_nodes);
The interface class to talk to peer gem5 processes.
DistHeaderPkt::Header Header
bool recvHeader(Header &header) override
Receive a header (i.e.
void initTransport() override
Init hook for the underlaying transport.
static std::vector< int > sockRegistry
Storage for all opened sockets.
bool anyislistening() const
static std::vector< std::pair< NodeInfo, int > > nodes
void sendPacket(const Header &header, const EthPacketPtr &packet) override
Send out a data packet to the remote end.
bool recvTCP(int sock, void *buf, unsigned length)
Receive the next incoming message through a TCP stream socket.
void recvPacket(const Header &header, EthPacketPtr &packet) override
Receive a packet from the remote end.
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.
int sock
The stream socket to connect to the server.
void establishConnection()
void sendCmd(const Header &header) override
Send out a control command to the remote end.
void sendTCP(int sock, const void *buf, unsigned length)
Send out a message through a TCP stream socket.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Tick
Tick count type.
std::shared_ptr< EthPacketData > EthPacketPtr
Compute node info and storage for the very first connection from each node (used by the switch)