From 4890ca6ed81f89bc3f784f184fdddf3331e157d5 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 9 May 2017 14:16:03 +0200 Subject: [PATCH] Cleanup after the split of modules and fix visibility --- Sources/NIO/ChannelOutboundInvoker.swift | 6 +++--- Sources/{NIO => NIOEchoServer}/main.swift | 2 ++ niolinux/main.swift | 18 ------------------ nioremote/main.swift | 18 ------------------ 4 files changed, 5 insertions(+), 39 deletions(-) rename Sources/{NIO => NIOEchoServer}/main.swift (98%) delete mode 100644 niolinux/main.swift delete mode 100644 nioremote/main.swift 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!") -