libguac  0.9.11-incubating
socket-fntypes.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
20 #ifndef _GUAC_SOCKET_FNTYPES_H
21 #define _GUAC_SOCKET_FNTYPES_H
22 
29 #include "socket-types.h"
30 
31 #include <unistd.h>
32 
43 typedef ssize_t guac_socket_read_handler(guac_socket* socket,
44  void* buf, size_t count);
45 
56 typedef ssize_t guac_socket_write_handler(guac_socket* socket,
57  const void* buf, size_t count);
58 
70 typedef int guac_socket_select_handler(guac_socket* socket, int usec_timeout);
71 
83 typedef ssize_t guac_socket_flush_handler(guac_socket* socket);
84 
93 typedef void guac_socket_lock_handler(guac_socket* socket);
94 
104 
114 
115 #endif
116 
void guac_socket_lock_handler(guac_socket *socket)
When set within a guac_socket, a handler of this type will be called whenever exclusive access to the...
Definition: socket-fntypes.h:93
Type definitions related to the guac_socket object.
ssize_t guac_socket_flush_handler(guac_socket *socket)
Generic flush handler for socket flush operations.
Definition: socket-fntypes.h:83
The core I/O object of Guacamole.
Definition: socket.h:38
ssize_t guac_socket_write_handler(guac_socket *socket, const void *buf, size_t count)
Generic write handler for socket write operations, modeled after the standard POSIX write() function...
Definition: socket-fntypes.h:56
void guac_socket_unlock_handler(guac_socket *socket)
When set within a guac_socket, a handler of this type will be called whenever exclusive access to the...
Definition: socket-fntypes.h:103
int guac_socket_free_handler(guac_socket *socket)
Generic handler for the closing of a socket, modeled after the standard POSIX close() function...
Definition: socket-fntypes.h:113
int guac_socket_select_handler(guac_socket *socket, int usec_timeout)
Generic handler for socket select operations, similar to the POSIX select() function.
Definition: socket-fntypes.h:70
ssize_t guac_socket_read_handler(guac_socket *socket, void *buf, size_t count)
Generic read handler for socket read operations, modeled after the standard POSIX read() function...
Definition: socket-fntypes.h:43