zhang chenhong / Mbed 2 deprecated IDW01M1_Cloud_IBM

Dependencies:   mbed Servo X_NUCLEO_IKS01A2 X_NUCLEO_IDW01M1v2 NetworkSocketAPI NDefLib MQTT

Committer:
mridup
Date:
Fri Apr 08 12:07:17 2016 +0000
Revision:
0:cbf8bc43bc9e
changes for optimization in Keil compiler

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mridup 0:cbf8bc43bc9e 1 /* UDPSocket
mridup 0:cbf8bc43bc9e 2 * Copyright (c) 2015 ARM Limited
mridup 0:cbf8bc43bc9e 3 *
mridup 0:cbf8bc43bc9e 4 * Licensed under the Apache License, Version 2.0 (the "License");
mridup 0:cbf8bc43bc9e 5 * you may not use this file except in compliance with the License.
mridup 0:cbf8bc43bc9e 6 * You may obtain a copy of the License at
mridup 0:cbf8bc43bc9e 7 *
mridup 0:cbf8bc43bc9e 8 * http://www.apache.org/licenses/LICENSE-2.0
mridup 0:cbf8bc43bc9e 9 *
mridup 0:cbf8bc43bc9e 10 * Unless required by applicable law or agreed to in writing, software
mridup 0:cbf8bc43bc9e 11 * distributed under the License is distributed on an "AS IS" BASIS,
mridup 0:cbf8bc43bc9e 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mridup 0:cbf8bc43bc9e 13 * See the License for the specific language governing permissions and
mridup 0:cbf8bc43bc9e 14 * limitations under the License.
mridup 0:cbf8bc43bc9e 15 */
mridup 0:cbf8bc43bc9e 16
mridup 0:cbf8bc43bc9e 17 #ifndef UDP_SOCKET_H
mridup 0:cbf8bc43bc9e 18 #define UDP_SOCKET_H
mridup 0:cbf8bc43bc9e 19
mridup 0:cbf8bc43bc9e 20 #include "Socket.h"
mridup 0:cbf8bc43bc9e 21
mridup 0:cbf8bc43bc9e 22 /** UDPSocket class
mridup 0:cbf8bc43bc9e 23 * API for handling UDP sockets. The implementation is determined
mridup 0:cbf8bc43bc9e 24 * by the interface passed during construction.
mridup 0:cbf8bc43bc9e 25 */
mridup 0:cbf8bc43bc9e 26 class UDPSocket : public Socket
mridup 0:cbf8bc43bc9e 27 {
mridup 0:cbf8bc43bc9e 28 public:
mridup 0:cbf8bc43bc9e 29 /** Create a socket using the specified network interface
mridup 0:cbf8bc43bc9e 30 * No network operations are performed until the socket is actually used
mridup 0:cbf8bc43bc9e 31 * @param iface The network interface to use
mridup 0:cbf8bc43bc9e 32 * @param ip Optional URL to connect to, copied internally
mridup 0:cbf8bc43bc9e 33 * @param port Optional port to connect to
mridup 0:cbf8bc43bc9e 34 */
mridup 0:cbf8bc43bc9e 35 UDPSocket(NetworkInterface *iface)
mridup 0:cbf8bc43bc9e 36 : Socket(iface, NS_UDP) {}
mridup 0:cbf8bc43bc9e 37 };
mridup 0:cbf8bc43bc9e 38
mridup 0:cbf8bc43bc9e 39 #endif