~ubuntu-branches/ubuntu/utopic/adios/utopic

« back to all changes in this revision

Viewing changes to src/adios_socket.h

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2013-12-09 15:21:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131209152131-jtd4fpmdv3xnunnm
Tags: 1.5.0-1
* New upstream.
* Standards-Version: 3.9.5
* Include latest config.{sub,guess} 
* New watch file.
* Create libadios-bin for binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
2
 
 * ADIOS is freely available under the terms of the BSD license described
3
 
 * in the COPYING file in the top level directory of this source distribution.
4
 
 *
5
 
 * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
6
 
 */
7
 
 
8
 
 
9
 
#include <sys/types.h>
10
 
#include <sys/socket.h>
11
 
#include <netinet/in.h>
12
 
 
13
 
/** Get host:port info from some file.
14
 
    Input: 
15
 
      env_var_name    environment variable name that contains the path to a file to be checked
16
 
      filename        name of file to be looked for if not named in the env var.
17
 
      path,           first path to look for 'filename'
18
 
      alternate_path  alternate path to look for 'filename'
19
 
      default_port    value to be returned in 'port' if port info is not found
20
 
 
21
 
    Output: 
22
 
      host            host name, string will be allocated
23
 
      port            port value
24
 
 
25
 
    Host will be NULL if information is not found 
26
 
    port will be default_port if that part of info is not found
27
 
 */
28
 
 
29
 
 
30
 
/// Socket functions
31
 
 
32
 
int adios_create_socket(int *socketid);
33
 
int adios_close_socket(int socketid);
34
 
int adios_set_socket_address(char *hostname,int port,struct sockaddr_in *address);
35
 
int adios_bind_socket(int socketid,struct sockaddr_in *address);
36
 
int adios_connect_socket(int socketid,struct sockaddr_in *address);
37
 
int adios_socket_start_listen(int socketid);
38
 
int adios_socket_accept(int socketid,int *connected);
39
 
int adios_blocking_read_request(int socketid,char *buffer,int maxlength);
40
 
 
41
 
/** Read message in one block that fits into buffer. 
42
 
Much faster than adios_BlockingReadRequest that is used for short message exchange only.
43
 
*/
44
 
int adios_read_block(int socketid,char *buffer,int maxlength);
45
 
 
46
 
int adios_blocking_write_request(int socketid,char *buffer,int length);
47
 
int adios_get_own_hostname(char *host);
48
 
int adios_get_remote_hostname(int socket,char *remotehost);