• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

ink_sock.h

Go to the documentation of this file.
00001 /** @file
00002 
00003   A brief file description
00004 
00005   @section license License
00006 
00007   Licensed to the Apache Software Foundation (ASF) under one
00008   or more contributor license agreements.  See the NOTICE file
00009   distributed with this work for additional information
00010   regarding copyright ownership.  The ASF licenses this file
00011   to you under the Apache License, Version 2.0 (the
00012   "License"); you may not use this file except in compliance
00013   with the License.  You may obtain a copy of the License at
00014 
00015       http://www.apache.org/licenses/LICENSE-2.0
00016 
00017   Unless required by applicable law or agreed to in writing, software
00018   distributed under the License is distributed on an "AS IS" BASIS,
00019   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00020   See the License for the specific language governing permissions and
00021   limitations under the License.
00022  */
00023 
00024 /***************************************************************************
00025   Socket operations
00026 
00027 
00028 
00029 ***************************************************************************/
00030 #if !defined (_ink_sock_h_)
00031 #define _ink_sock_h_
00032 
00033 #include "ink_platform.h"
00034 #include "ink_defs.h"
00035 
00036 #include "ink_apidefs.h"
00037 
00038 int safe_setsockopt(int s, int level, int optname, char *optval, int optlevel);
00039 int safe_getsockopt(int s, int level, int optname, char *optval, int *optlevel);
00040 int safe_bind(int s, struct sockaddr const* name, int namelen);
00041 int safe_listen(int s, int backlog);
00042 int safe_getsockname(int s, struct sockaddr *name, int *namelen);
00043 
00044 int safe_fcntl(int fd, int cmd, int arg);
00045 int safe_ioctl(int fd, int request, char *arg);
00046 
00047 int safe_set_fl(int fd, int arg);
00048 int safe_clr_fl(int fd, int arg);
00049 
00050 int safe_blocking(int fd);
00051 int safe_nonblocking(int fd);
00052 
00053 int write_ready(int fd);
00054 int read_ready(int fd);
00055 
00056 char fd_read_char(int fd);
00057 int fd_read_line(int fd, char *s, int len);
00058 
00059 int close_socket(int s);
00060 int write_socket(int s, const char *buffer, int length);
00061 int read_socket(int s, char *buffer, int length);
00062 
00063 inkcoreapi uint32_t ink_inet_addr(const char *s);
00064 
00065 
00066 #endif /* _ink_sock_h_ */

Generated by  doxygen 1.7.1