dhgdh
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
TCPAsynch.h
00001 /* 00002 * PackageLicenseDeclared: Apache-2.0 00003 * Copyright (c) 2015 ARM Limited 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 #ifndef __MBED_NET_SOCKETS_V0_TCP_ASYNCH__ 00018 #define __MBED_NET_SOCKETS_V0_TCP_ASYNCH__ 00019 00020 #include "Socket.h" 00021 #include "mbed-net-socket-abstract/socket_api.h" 00022 00023 #include "Ticker.h" 00024 00025 namespace mbed { 00026 namespace Sockets { 00027 namespace v0 { 00028 class TCPAsynch: public Socket { 00029 protected: 00030 TCPAsynch(const socket_stack_t stack); 00031 ~TCPAsynch(); 00032 00033 public: 00034 virtual socket_error_t open(const socket_address_family_t af); 00035 protected: 00036 static Ticker _ticker; 00037 static FunctionPointer0<void> _tick_handler; 00038 // uintptr_t is used to guarantee that there will always be a large enough 00039 // counter to avoid overflows. Memory allocation will always fail before 00040 // counter overflow if the counter is the same size as the pointer type and 00041 // sizeof(TCPAsynch) > 0 00042 static uintptr_t _TCPSockets; 00043 }; 00044 } // namespace v0 00045 } // namespace Sockets 00046 } // namespace mbed 00047 #endif // __MBED_NET_SOCKETS_V0_TCP_ASYNCH__
Generated on Tue Jul 12 2022 11:02:01 by
1.7.2
