My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
socket_monitor.h File Reference

Monitors an incoming port for messages from runtime or controller. More...

Go to the source code of this file.

Functions

int monitor_controller_socket (int fd)
 Adds the global controller to be monitored by the socket monitor. More...
 
int monitor_runtime_socket (int fd)
 Adds a runtime to be monitored by the socket monitor. More...
 
int run_socket_monitor (int local_port, struct sockaddr_in *ctrl_addr)
 Starts (blocking) the socket monitor, listening on the provided port. More...
 

Detailed Description

Monitors an incoming port for messages from runtime or controller.

Definition in file socket_monitor.h.

Function Documentation

int monitor_controller_socket ( int  fd)

Adds the global controller to be monitored by the socket monitor.

Parameters
fdthe file decriptor of the global controller
Returns
0 on success, -1 on error

Definition at line 116 of file socket_monitor.c.

int monitor_runtime_socket ( int  fd)

Adds a runtime to be monitored by the socket monitor.

Parameters
fdthe file descriptor of the new runtime
Returns
0 on success, -1 on error

Definition at line 130 of file socket_monitor.c.

int run_socket_monitor ( int  local_port,
struct sockaddr_in *  ctrl_addr 
)

Starts (blocking) the socket monitor, listening on the provided port.

Also connects to the global controller at the provided address

Definition at line 145 of file socket_monitor.c.