提交 a9564154069819fcc447518c7f61279792d00b37

作者 LJH 李佳桓
1 个父辈 17078842

add

正在显示 1 个修改的文件 包含 30 行增加0 行删除
  1 +/*
  2 + * Copyright 2007 Stephen Liu
  3 + * For license terms, see the file COPYING along with this library.
  4 + */
  5 +
  6 +#ifndef __spioutils_hpp__
  7 +#define __spioutils_hpp__
  8 +
  9 +#include "spporting.hpp"
  10 +
  11 +class SP_IOUtils {
  12 +public:
  13 + static void inetNtoa( in_addr * addr, char * ip, int size );
  14 +
  15 + static int setNonblock( int fd );
  16 +
  17 + static int setBlock( int fd );
  18 +
  19 + static int tcpListen( const char * ip, int port, int * fd, int blocking = 1 );
  20 +
  21 + static int initDaemon( const char * workdir = 0 );
  22 +
  23 + static int tcpListen( const char * path, int * fd, int blocking = 1, int mode = 0666 );
  24 +
  25 +private:
  26 + SP_IOUtils();
  27 +};
  28 +
  29 +#endif
  30 +
注册登录 后发表评论