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.
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
SocketInterface.cpp@41:3ec1c97e9bbf, 2016-02-23 (annotated)
- Committer:
- Christopher Haster
- Date:
- Tue Feb 23 04:01:38 2016 -0600
- Branch:
- api-changes
- Revision:
- 41:3ec1c97e9bbf
- Parent:
- 38:157fb2ab965f
Moved timeout handling to setTimeout/getTimeout functions
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Christopher Haster |
23:1e86d9fb3d86 | 1 | /* SocketInterface Base Class |
| Christopher Haster |
23:1e86d9fb3d86 | 2 | * Copyright (c) 2015 ARM Limited |
| Christopher Haster |
23:1e86d9fb3d86 | 3 | * |
| Christopher Haster |
23:1e86d9fb3d86 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| Christopher Haster |
23:1e86d9fb3d86 | 5 | * you may not use this file except in compliance with the License. |
| Christopher Haster |
23:1e86d9fb3d86 | 6 | * You may obtain a copy of the License at |
| Christopher Haster |
23:1e86d9fb3d86 | 7 | * |
| Christopher Haster |
23:1e86d9fb3d86 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| Christopher Haster |
23:1e86d9fb3d86 | 9 | * |
| Christopher Haster |
23:1e86d9fb3d86 | 10 | * Unless required by applicable law or agreed to in writing, software |
| Christopher Haster |
23:1e86d9fb3d86 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| Christopher Haster |
23:1e86d9fb3d86 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| Christopher Haster |
23:1e86d9fb3d86 | 13 | * See the License for the specific language governing permissions and |
| Christopher Haster |
23:1e86d9fb3d86 | 14 | * limitations under the License. |
| Christopher Haster |
23:1e86d9fb3d86 | 15 | */ |
| Christopher Haster |
23:1e86d9fb3d86 | 16 | |
| Christopher Haster |
23:1e86d9fb3d86 | 17 | #include "SocketInterface.h" |
| Christopher Haster |
38:157fb2ab965f | 18 | |
| Christopher Haster |
41:3ec1c97e9bbf | 19 | // By default set hooks have no special behaviour |
| Christopher Haster |
41:3ec1c97e9bbf | 20 | void SocketInterface::setIPAddress(const char *) {} |
| Christopher Haster |
41:3ec1c97e9bbf | 21 | void SocketInterface::setPort(uint16_t) {} |
| Christopher Haster |
41:3ec1c97e9bbf | 22 | void SocketInterface::setTimeout(uint32_t) {} |
| Christopher Haster |
23:1e86d9fb3d86 | 23 | |
| Christopher Haster |
38:157fb2ab965f | 24 | // By default isConnected is always true if the socket |
| Christopher Haster |
38:157fb2ab965f | 25 | // was created successfully |
| Christopher Haster |
38:157fb2ab965f | 26 | bool SocketInterface::isConnected() { |
| Christopher Haster |
38:157fb2ab965f | 27 | return true; |
| Christopher Haster |
38:157fb2ab965f | 28 | } |
| Christopher Haster |
38:157fb2ab965f | 29 |
