/[monit]/monit/socket.h
ViewVC logotype

Diff of /monit/socket.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by hauk, Fri Aug 1 21:35:59 2003 UTC revision 1.9 by hauk, Mon Aug 4 07:57:02 2003 UTC
# Line 72  void socket_free(Socket_T *S); Line 72  void socket_free(Socket_T *S);
72    
73  /**  /**
74   * Returns TRUE if the socket is ready for i|o   * Returns TRUE if the socket is ready for i|o
75   * @param s A Socket object   * @param S A Socket object
76   * @return TRUE if the socket is ready otherwise FALSE   * @return TRUE if the socket is ready otherwise FALSE
77   */   */
78  int socket_is_ready(Socket_T s);  int socket_is_ready(Socket_T S);
79    
80    
81  /**  /**
82   * Get the underlying socket descriptor   * Get the underlying socket descriptor
83   * @param s A Socket object   * @param S A Socket object
84   * @return The socket descriptor   * @return The socket descriptor
85   */   */
86  int socket_get_socket(Socket_T s);  int socket_get_socket(Socket_T S);
87    
88    
89  /**  /**
90   * Get the Port object used to create this socket. If no Port object   * Get the Port object used to create this socket. If no Port object
91   * was used this method returns NULL.   * was used this method returns NULL.
92   * @param s A Socket object   * @param S A Socket object
93   * @return The Port object or NULL   * @return The Port object or NULL
94   */   */
95  void *socket_get_Port(Socket_T s);  void *socket_get_Port(Socket_T S);
96    
97    
98  /**  /**
99   * Get the remote port number the socket is connected to   * Get the remote port number the socket is connected to
100   * @param s A Socket object   * @param S A Socket object
101   * @return The remote host's port number   * @return The remote host's port number
102   */   */
103  int socket_get_remote_port(Socket_T s);  int socket_get_remote_port(Socket_T S);
104    
105    
106  /**  /**
107   * Get the remote host name this socket is connected to   * Get the remote host name this socket is connected to
108   * @param s A Socket object   * @param S A Socket object
109   * @return The remote hostname   * @return The remote hostname
110   */   */
111  const char *socket_get_remote_hostname(Socket_T s);  const char *socket_get_remote_hostname(Socket_T S);
112    
113    
114  /**  /**
115   * Writes a character string. Use this function to send text based   * Writes a character string. Use this function to send text based
116   * messages to a client.   * messages to a client.
117   * @param s A Socket_T object   * @param S A Socket_T object
118   * @param m A String to send to the client   * @param m A String to send to the client
119   * @return The bytes sent or -1 if an error occured   * @return The bytes sent or -1 if an error occured
120   */   */
121  int socket_print(Socket_T s, const char *m, ...);  int socket_print(Socket_T S, const char *m, ...);
122    
123    
124  /**  /**
125   * Write size bytes from the buffer b.   * Write size bytes from the buffer b.
126   * @param s A Socket_T object   * @param S A Socket_T object
127   * @param b The data to be written   * @param b The data to be written
128   * @param size The size of the data in b   * @param size The size of the data in b
129   * @return The bytes sent or -1 if an error occured   * @return The bytes sent or -1 if an error occured
130   */   */
131  int socket_write(Socket_T s, void *b, int size);  int socket_write(Socket_T S, void *b, int size);
132    
133    
134  /**  /**
135   * Reads size bytes and stores them into the byte buffer pointed to by b.   * Reads size bytes and stores them into the byte buffer pointed to by b.
136   * @param s A Socket_T object   * @param S A Socket_T object
137   * @param b A Byte buffer   * @param b A Byte buffer
138   * @param size The size of the buffer b   * @param size The size of the buffer b
139   * @return The bytes read or -1 if an error occured   * @return The bytes read or -1 if an error occured
140   */   */
141  int socket_read(Socket_T s, void *b, int size);  int socket_read(Socket_T S, void *b, int size);
142    
143    
144  #endif  #endif

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26