Molssi Driver Interface Library
mdi_tcp.h
Go to the documentation of this file.
1 
6 #ifndef MDI_TCP_IMPL
7 #define MDI_TCP_IMPL
8 
9 #include "mdi.h"
10 #include "mdi_global.h"
11 
12 void sigint_handler(int dummy);
13 
14 int enable_tcp_support(int code_id);
15 int tcp_on_selection();
17 int tcp_on_send_command(const char* command, MDI_Comm comm, int* skip_flag);
18 int tcp_after_send_command(const char* command, MDI_Comm comm);
19 int tcp_on_recv_command(MDI_Comm comm);
20 
21 
22 int tcp_listen(int port_in);
23 int tcp_request_connection(int port_in, char* hostname_ptr);
25 int tcp_send(const void* buf, int count, MDI_Datatype datatype, MDI_Comm comm, int msg_flag);
26 int tcp_recv(void* buf, int count, MDI_Datatype datatype, MDI_Comm comm, int msg_flag);
27 
28 #endif
tcp_accept_connection
int tcp_accept_connection()
Accept a TCP connection request.
Definition: mdi_tcp.c:413
sigint_handler
void sigint_handler(int dummy)
SIGINT handler to ensure the socket is closed on termination.
Definition: mdi_tcp.c:32
enable_tcp_support
int enable_tcp_support(int code_id)
Enable support for the TCP method.
Definition: mdi_tcp.c:43
tcp_listen
int tcp_listen(int port_in)
Begin listening for incoming TCP connections.
Definition: mdi_tcp.c:209
tcp_on_recv_command
int tcp_on_recv_command(MDI_Comm comm)
Callback when the TCP method must receive a command.
Definition: mdi_tcp.c:198
mdi_global.h
Global structures used by MDI.
tcp_send
int tcp_send(const void *buf, int count, MDI_Datatype datatype, MDI_Comm comm, int msg_flag)
Send data through an MDI connection, using TCP.
Definition: mdi_tcp.c:513
tcp_on_selection
int tcp_on_selection()
Callback when the end-user selects TCP as the method.
Definition: mdi_tcp.c:68
tcp_after_send_command
int tcp_after_send_command(const char *command, MDI_Comm comm)
Callback after the TCP method has received a command.
Definition: mdi_tcp.c:186
tcp_request_connection
int tcp_request_connection(int port_in, char *hostname_ptr)
Request a connection over TCP.
Definition: mdi_tcp.c:282
tcp_on_accept_communicator
int tcp_on_accept_communicator()
Callback when the TCP method must accept a communicator.
Definition: mdi_tcp.c:127
tcp_on_send_command
int tcp_on_send_command(const char *command, MDI_Comm comm, int *skip_flag)
Callback when the TCP method must send a command.
Definition: mdi_tcp.c:179
tcp_recv
int tcp_recv(void *buf, int count, MDI_Datatype datatype, MDI_Comm comm, int msg_flag)
Receive data through an MDI connection, using TCP.
Definition: mdi_tcp.c:582