diff --git a/Sources/NIO/ChannelOutboundInvoker.swift b/Sources/NIO/ChannelOutboundInvoker.swift index 66fbf347f..b06b44296 100644 --- a/Sources/NIO/ChannelOutboundInvoker.swift +++ b/Sources/NIO/ChannelOutboundInvoker.swift @@ -32,15 +32,15 @@ protocol ChannelOutboundInvoker { // Default implementations for methods that not take a promise. extension ChannelOutboundInvoker { - func write(data: Buffer) -> Future { + public func write(data: Buffer) -> Future { return write(data: data, promise: Promise()) } - func writeAndFlush(data: Buffer) -> Future { + public func writeAndFlush(data: Buffer) -> Future { return writeAndFlush(data: data, promise: Promise()) } - func close() -> Future { + public func close() -> Future { return close(promise: Promise()) } } diff --git a/Sources/NIO/main.swift b/Sources/NIOEchoServer/main.swift similarity index 98% rename from Sources/NIO/main.swift rename to Sources/NIOEchoServer/main.swift index f37c2259d..5c43946df 100644 --- a/Sources/NIO/main.swift +++ b/Sources/NIOEchoServer/main.swift @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// import Foundation +import NIO +import Future public class EchoHandler: ChannelHandler { diff --git a/niolinux/main.swift b/niolinux/main.swift deleted file mode 100644 index b43f86111..000000000 --- a/niolinux/main.swift +++ /dev/null @@ -1,18 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// - -import Foundation - -print("Hello, Linux!") - diff --git a/nioremote/main.swift b/nioremote/main.swift deleted file mode 100644 index b43f86111..000000000 --- a/nioremote/main.swift +++ /dev/null @@ -1,18 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// This source file is part of the SwiftNIO open source project -// -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIO project authors -// -// SPDX-License-Identifier: Apache-2.0 -// -//===----------------------------------------------------------------------===// - -import Foundation - -print("Hello, Linux!") -