2 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef _COM_CORE_THREAD_H
19 #define _COM_CORE_THREAD_H
25 extern int com_core_thread_client_create(const char *addr, int is_sync, int (*service_cb)(int fd, void *data), void *data);
26 extern int com_core_thread_server_create(const char *addr, int is_sync, int (*service_cb)(int fd, void *data), void *data);
28 extern int com_core_thread_server_destroy(int handle);
29 extern int com_core_thread_client_destroy(int handle);
31 extern int com_core_thread_recv(int handle, char *buffer, int size, int *sender_pid, double timeout);
32 extern int com_core_thread_send(int handle, const char *buffer, int size, double timeout);
34 extern int com_core_thread_recv_with_fd(int handle, char *buffer, int size, int *sender_pid, double timeout, int *fd);
35 extern int com_core_thread_send_with_fd(int handle, const char *buffer, int size, double timeout, int fd);