*
* \returns The IMD socket if successful. Otherwise prints an error message and returns NULL.
*/
-IMDSocket *imdsock_create();
+IMDSocket* imdsock_create();
//! Portability wrapper around sleep function
void imd_sleep(unsigned int seconds);
*
* \returns 0 if successful.
*/
-int imdsock_bind(IMDSocket *sock, int port);
+int imdsock_bind(IMDSocket* sock, int port);
/*! \brief Set socket to listening state.
* \returns 0 if successful.
*
*/
-int imd_sock_listen(IMDSocket *sock);
+int imd_sock_listen(IMDSocket* sock);
/*! \brief Accept incoming connection and redirect to client socket.
*
* \returns IMD socket if successful, NULL otherwise.
*/
-IMDSocket *imdsock_accept(IMDSocket *sock);
+IMDSocket* imdsock_accept(IMDSocket* sock);
/*! \brief Get the port number used for IMD connection.
*
* \returns 0 if successful, an error code otherwise.
*/
-int imdsock_getport(IMDSocket *sock, int *port);
+int imdsock_getport(IMDSocket* sock, int* port);
//! Portability wrapper around system htonl function.
int imd_htonl(int src);
*
* \returns The number of bytes written, or -1.
*/
-int imdsock_write(IMDSocket *sock, const char *buffer, int length);
+int imdsock_write(IMDSocket* sock, const char* buffer, int length);
/*! \brief Read from socket.
*
* \returns The number of bytes read, or -1 for errors.
*/
-int imdsock_read(IMDSocket *sock, char *buffer, int length);
+int imdsock_read(IMDSocket* sock, char* buffer, int length);
/*! \brief Shutdown the socket.
* \param sock The IMD socket.
*
*/
-void imdsock_shutdown(IMDSocket *sock);
+void imdsock_shutdown(IMDSocket* sock);
/*! \brief Close the socket and free the sock struct memory.
*
* \returns 1 on success, or 0 if unsuccessful.
*/
-int imdsock_destroy(IMDSocket *sock);
+int imdsock_destroy(IMDSocket* sock);
/*! \brief Try to read from the socket.
* \param timeoutusec Time out microseconds
*
*/
-int imdsock_tryread(IMDSocket *sock, int timeoutsec, int timeoutusec);
+int imdsock_tryread(IMDSocket* sock, int timeoutsec, int timeoutusec);
} // namespace gmx