ap

Dependencies:   DnsQuery

Dependents:   WizFi310_TCP_Echo_Server_Example

Fork of NetworkSocketAPI by NetworkSocketAPI

Committer:
Christopher Haster
Date:
Thu Feb 18 03:11:58 2016 -0600
Branch:
api-changes
Revision:
21:35ed15069189
Parent:
18:dd05ebdd2546
Child:
26:9774a2edad71
Added UDPSocket and TCPSocket API and changes to core API

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 18:dd05ebdd2546 1 /* EthernetInterface Base Class
sam_grove 18:dd05ebdd2546 2 * Copyright (c) 2015 ARM Limited
sam_grove 18:dd05ebdd2546 3 *
sam_grove 18:dd05ebdd2546 4 * Licensed under the Apache License, Version 2.0 (the "License");
sam_grove 18:dd05ebdd2546 5 * you may not use this file except in compliance with the License.
sam_grove 18:dd05ebdd2546 6 * You may obtain a copy of the License at
sam_grove 18:dd05ebdd2546 7 *
sam_grove 18:dd05ebdd2546 8 * http://www.apache.org/licenses/LICENSE-2.0
sam_grove 18:dd05ebdd2546 9 *
sam_grove 18:dd05ebdd2546 10 * Unless required by applicable law or agreed to in writing, software
sam_grove 18:dd05ebdd2546 11 * distributed under the License is distributed on an "AS IS" BASIS,
sam_grove 18:dd05ebdd2546 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
sam_grove 18:dd05ebdd2546 13 * See the License for the specific language governing permissions and
sam_grove 18:dd05ebdd2546 14 * limitations under the License.
sam_grove 18:dd05ebdd2546 15 */
sam_grove 18:dd05ebdd2546 16
Christopher Haster 21:35ed15069189 17 #ifndef ETHERNET_INTERFACE_H
Christopher Haster 21:35ed15069189 18 #define ETHERNET_INTERFACE_H
sam_grove 18:dd05ebdd2546 19
sam_grove 18:dd05ebdd2546 20 #include "NetworkInterface.h"
sam_grove 18:dd05ebdd2546 21
sam_grove 18:dd05ebdd2546 22
Christopher Haster 21:35ed15069189 23 /** EthernetInterface class
Christopher Haster 21:35ed15069189 24 * Common interface that is shared between ethernet hardware
sam_grove 18:dd05ebdd2546 25 */
sam_grove 18:dd05ebdd2546 26 class EthernetInterface : public NetworkInterface
sam_grove 18:dd05ebdd2546 27 {
sam_grove 18:dd05ebdd2546 28 public:
sam_grove 18:dd05ebdd2546 29
Christopher Haster 21:35ed15069189 30 /** Start the interface
Christopher Haster 21:35ed15069189 31 * @param timeout_ms Time in milliseconds to wait for a connection
Christopher Haster 21:35ed15069189 32 * @return 0 on success
Christopher Haster 21:35ed15069189 33 */
Christopher Haster 21:35ed15069189 34 virtual int32_t connect(uint32_t timeout_ms = 15000) = 0;
Christopher Haster 21:35ed15069189 35
Christopher Haster 21:35ed15069189 36 /** Stop the interface
Christopher Haster 21:35ed15069189 37 * @return 0 on success
Christopher Haster 21:35ed15069189 38 */
Christopher Haster 21:35ed15069189 39 virtual int32_t disconnect() = 0;
sam_grove 18:dd05ebdd2546 40 };
sam_grove 18:dd05ebdd2546 41
sam_grove 18:dd05ebdd2546 42 #endif