a library to use GPRS like ethernet or wifi, which makes it possible to connect to the internet with your GPRS module
Dependents: Seeed_GPRS_Library_HelloWorld Seeed_GPRS_Xively_HelloWorld Seeed_ARCH_GPRS_V2_Xively_HelloWorld Seeed_ARCH_GPRS_V2_ThingSpeak_HelloWorld ... more
Socket.h
00001 /* 00002 Socket.h 00003 2014 Copyright (c) Seeed Technology Inc. All right reserved. 00004 00005 Author:lawliet zou(lawliet.zou@gmail.com) 00006 2014-2-24 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 #ifndef SOCKET_H_ 00023 #define SOCKET_H_ 00024 00025 #include "GPRS.h" 00026 00027 /** Socket file descriptor and select wrapper 00028 */ 00029 class Socket { 00030 public: 00031 /** Socket 00032 */ 00033 Socket(); 00034 00035 void set_blocking(bool blocking, unsigned int timeout=1); 00036 00037 /** Close the socket file descriptor 00038 */ 00039 int close(); 00040 00041 ~Socket(); 00042 00043 protected: 00044 int _sock_fd; 00045 GPRS* gprs; 00046 }; 00047 00048 00049 #endif /* SOCKET_H_ */
Generated on Thu Jul 14 2022 07:16:02 by 1.7.2