25 #ifndef RUNTIME_COMMUNICATION_H_
26 #define RUNTIME_COMMUNICATION_H_
31 #include <netinet/ip.h>
int init_runtime_socket(int listen_port)
Initializes the socket listening for incoming connections.
int add_runtime_peer(unsigned int runtime_id, int fd)
Adds the file descriptor to the list of current runtime peers.
Header for messages to runtime from another runtime.
Definitions of the message types that can be passed between runtimes.
int send_to_peer(unsigned int runtime_id, struct inter_runtime_msg_hdr *hdr, void *payload)
Sends a message to the peer runtime with the provided id.
static int runtime_id(int runtime_fd)
int handle_runtime_communication(int fd)
Reads a message off of the provided file descriptor as if it is coming from a runtime peer...
int connect_to_runtime_peer(unsigned int id, struct sockaddr_in *addr)
Innitiates a connection to a runtime peer with the given ID at the given address. ...