Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Servo X_NUCLEO_IKS01A2 X_NUCLEO_IDW01M1v2 NetworkSocketAPI NDefLib MQTT
NetworkSocketAPI/TCPSocket.h@0:cbf8bc43bc9e, 2016-04-08 (annotated)
- 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?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mridup | 0:cbf8bc43bc9e | 1 | /* TCPSocket |
| 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 TCP_SOCKET_H |
| mridup | 0:cbf8bc43bc9e | 18 | #define TCP_SOCKET_H |
| mridup | 0:cbf8bc43bc9e | 19 | |
| mridup | 0:cbf8bc43bc9e | 20 | #include "Socket.h" |
| mridup | 0:cbf8bc43bc9e | 21 | |
| mridup | 0:cbf8bc43bc9e | 22 | /** TCPSocket class |
| mridup | 0:cbf8bc43bc9e | 23 | * API for handling TCP sockets. The implementation is determined |
| mridup | 0:cbf8bc43bc9e | 24 | * by the interface passed during construction. |
| mridup | 0:cbf8bc43bc9e | 25 | */ |
| mridup | 0:cbf8bc43bc9e | 26 | class TCPSocket : 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 url 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 | TCPSocket(NetworkInterface *iface) |
| mridup | 0:cbf8bc43bc9e | 36 | : Socket(iface, NS_TCP) {} |
| mridup | 0:cbf8bc43bc9e | 37 | }; |
| mridup | 0:cbf8bc43bc9e | 38 | |
| mridup | 0:cbf8bc43bc9e | 39 | #endif |