Skip to content
Permalink
Branch: master
Commits on Jun 19, 2019
  1. Updated the embedded channel tests to write to the input and output m…

    tigerpixel authored and Lukasa committed Jun 19, 2019
    …ultiple times. (#1033)
    
    Motivation:
    
    The current test check that the buffer can be written to and then that it is cleared.
They do not check that once the buffer is cleared, it can be written to again.
    
    Modifications:
    
    Added a test for both the inbound and outbound buffer to check multiple writes to each buffer.
    
    Result:
    
    We can not be sure that multiple writes to either the inbound or outbound buffers on the embedded channel works.Updated the embedded channel tests to write to the input and output buffers multiple times.
Commits on Jun 18, 2019
  1. Add self where required WebSocket server tests. (#1034)

    tigerpixel authored and Lukasa committed Jun 18, 2019
    Motivation:
    
    To ensure the swift-NIO style for self is followed within the WebSocket tests.
    Modifications:
    
    Altered the style within the WebSocketServerEndToEnd tests.
    Result:
    
    Slightly more readable code.
Commits on Jun 16, 2019
  1. An HTTP upgrader class for a client pipeline. (#1001)

    tigerpixel authored and Lukasa committed Jun 16, 2019
    * Reorder ‘channel active’ calls to the same order as `_ChannelInboundHandler` and their likely chronological order.
    
    Motivation:
    When first viewing the example classes, coming to the ‘read’ method first, leaves the subject unclear as to what the method is ‘reading’.
    It is preferable to view something being sent first, and then to view the reading of the response.
    It also matches the call order against the protocol making it a little easier for those unfamiliar with the protocol to see which methods have been implemented.
    
    Modifications:
    Moved channel active calls to be top of the class.
    Despite the diff there are no actual code modifications.
    UDP Client changed to indent using spaces to match rest of project. Incidental change.
    
    Result:
    The examples are slighter clearer to read, particularly for newcomers to swift-no as the calls are in a logical chronological order.
    
    * Fix an error in the upgrader and its tests which checked the connection header incorrectly.
    
    Motivation:
    To correct the logic in the upgrader. Previously it checked if the upgraders required headers include the connection header. Now it checks that the connection header value was present as a separate header in the incoming request.
    To prepare the class naming for the presence of a client upgrader.
    
    Modifications:
    Slight change in server upgrader handler logic with accompanying tests.
    Renamed upgrader and test files to include the word ‘server’.
    Ran the linux test script.
    
    Result:
    The server upgrader now checks for the presence of the connection header value as a header of its own.
    
    * Rename WebSocketServer upgrader to make the naming clearer and make way for a client version.
    
    Motivation:
    
    To make the web socket upgrader naming clearer, particularly once we add a client version.
    
    Modifications:
    
    Rename WebSocketUpgrader too WebSocketServerUpgrader.
    
    Result:
    
    Improved clarity of naming on the web socket upgrader.
    
    * Adds  correct naming conventions to NIOWebSocketServerUpgrader. Sets back an incorrect fix (non-fix).
    
    * Move deprecation for NIOWebSocketServerUpgrader typealias out of API shims file.
    
    * Makes HTTPEncoder removable.
    Adds a client upgrade handler with tests.
    Adds the ability to use a client upgrader to the client setup.
    Initial linux file update.
    
    * Allow assertContains to be accessed publicly, so that it can be used in the client side tests.
    
    * Update tests to remove server upgrader from client tests.
    Change client tests to use Embedded channel.
    Update HTTPUpgradeConfiguration class name to be NIOHTTPServerUpgradeConfiguration
    Few other small stylistic changes.
    
    * Removed awaiting upgrader state.
    Removed future from handle upgrade call as is synchronous.
    Removed protocol iterator from handle upgrade call as is not required by the client.
    
    * Ensure that the client handler calls for the HTTPPipeline are backwards compatible.
    Ensure that incoming promises to the handler write call are completed.
    Neaten the upgrade header formation to remove looping.
    Improve the correctness of the upgrade error throwing.
    
    * Update scripts to match new unit tests.
    
    * Change the documentation for HTTPServerPipeline to remove nil options which have now been removed.
    
    * Restore an incorrectly added server pipeline comment change and make it to the client pipeline instead.
    
    * Raise the allocation limits in the docker images to allow the tests to pass.
Commits on Jun 12, 2019
  1. Rename the EndToEndTests in the WebSocket project to WebSocketServerE…

    tigerpixel authored and Lukasa committed Jun 12, 2019
    …ndToEndTests. (#1032)
    
    Motivation:
    
    To make the web socket server end to end tests class more descriptive.
    This will allow ‘WebSocketClientEndToEndTests’ or other end to end tests to be added at a later date.
    
    Modifications:
    
    Renames the class and filename for ‘EndToEndTests’ to ‘WebSocketServerEndToEndTests’
    
    Result:
    
    The nomenclature now allow for other end to end tests to be added.
Commits on May 2, 2019
  1. Update naming to allow for the easy addition of a HTTP client upgrade…

    tigerpixel authored and Lukasa committed May 2, 2019
    …r. (#983)
    
    Motivation:
    
    To make the web socket upgrader naming clearer, particularly once we add a client version.
    
    Modifications:
    
    Rename WebSocketUpgrader too WebSocketServerUpgrader.
    
    Result:
    
    Improved clarity of naming on the web socket upgrader.
Commits on Apr 8, 2019
  1. Reorder ‘channel active’ calls to the same order as `_ChannelInboundH…

    tigerpixel authored and weissi committed Apr 8, 2019
    …andler` and their likely chronological order. (#953)
    
    Motivation:
    When first viewing the example classes, coming to the ‘read’ method first, leaves the subject unclear as to what the method is ‘reading’.
    It is preferable to view something being sent first, and then to view the reading of the response.
    It also matches the call order against the protocol making it a little easier for those unfamiliar with the protocol to see which methods have been implemented.
    
    Modifications:
    Moved channel active calls to be top of the class.
    Despite the diff there are no actual code modifications.
    UDP Client changed to indent using spaces to match rest of project. Incidental change.
    
    Result:
    The examples are slighter clearer to read, particularly for newcomers to swift-no as the calls are in a logical chronological order.
Commits on Apr 5, 2019
  1. Add a HTTP1 client example. It is only a simple echo which closely re…

    tigerpixel authored and weissi committed Apr 5, 2019
    …sembles the TCP and UDP echo examples. (#941)
    
    Motivation:
    To provide a simple example of the HTTP1 client pipeline.
    To create a comparable example to the TCP and UDP demos to show what extra steps are needed for a HTTP layer.
    
    Modifications:
    Adds a NIOHTTP1Client example in a main file.
    Adds a readme to the NIOHTTP1Client example.
    
    Result:
    There is now a simple example of how to send a HTTP1 client request to the server.
Commits on Apr 2, 2019
  1. Add 2 missing server readme docs. (#940)

    tigerpixel authored and weissi committed Apr 2, 2019
    Add missing server readme docs for WebSocket server and UDP echo server.
    
    Motivation:
    With the exception of these two samples, all client and server examples have helpful readme docs.
    Provides brief description of purpose of the sample code and how to run it.
    
    Modifications:
    Adds a readme to NIOUDPEchoServer.
    Adds a readme to NIOWebSocketServer.
    
    Result:
    The samples for NIOUDPEchoServer and NIOWebSocketServer have a little explanation.
Commits on Mar 31, 2019
  1. Update style in TCP Client and HTTP1Server examples. (#937)

    tigerpixel authored and weissi committed Mar 31, 2019
    Motivation:
    There is a UDP echo client which is very similar to the NIOEchoClient.
    The styles of these two examples should match closely so ‘diff’ comparing will show the pertinent API differences.
    
    Modifications:
    Add self tags to member variables in the TCP echo client.
    Add a self tag to a member variable in the HTTP1 server.
    Remove an assert from the echo client.
    
    Result:
    The code in the TCP and UDP examples now matches and fits the SwiftNIO style.
  2. UDP Echo Client Example. (#933)

    tigerpixel authored and weissi committed Mar 31, 2019
    * UDP echo client example.
    
    Motivation:
    
    There is a UDP echo server example but it does not currently have a machine client example.
    The TCP echo server has both sample client and server examples and it would be preferable to match.
    The UDP client connection also differs from both the UDP server and the TCP client, so it is good to provide and example of this difference.
    
    Modifications:
    
    Added a UDP client example and a matching readme file.
    The main swift file is a similar to the TCP echo example as possible.
    
    Result:
    
    There is now a clear example of how to create a simple UDP client side connection.
Commits on Mar 20, 2019
  1. Motivation: (#911)

    tigerpixel authored and weissi committed Mar 20, 2019
    The README file example list is missing a couple of examples which are actually in the project, namely the UDP and WebSocket server example projects.
    
    Modifications:
    
    Added UDP and WebSocket server example projects to the README.
    
    Result:
    
    A full list of examples is now included in the README file.
You can’t perform that action at this time.