Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update style in TCP Client and HTTP1Server examples. #937

Merged

Conversation

tigerpixel
Copy link
Contributor

Update the style in the TCP Client example and HTTP1Server example to match the UDP client example.

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.' to member variables in the TCP echo client.
Add a 'self.' 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.

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.
@swift-nio-bot
Copy link

Can one of the admins verify this patch?

3 similar comments
@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@swift-nio-bot
Copy link

Can one of the admins verify this patch?

@tigerpixel
Copy link
Contributor Author

I have a separate pull request out (#933). This PR adds a UDP client example. During the code review stage, a few style changes were requested, which would make it differ from the TCP example. It seemed like a good idea to change the TCP example too. That other PR has not finished code review, so it is probably not a good idea to merge this until that is the case. Further changes may be needed and could easily go into this PR.

Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! @tigerpixel why 'DO NOT MERGE' ?

@weissi weissi added the semver/patch No public API change. label Mar 31, 2019
@tigerpixel tigerpixel changed the title [WIP - DO NOT MERGE] Update style in TCP Client and HTTP1Server examples. Update style in TCP Client and HTTP1Server examples. Mar 31, 2019
@tigerpixel
Copy link
Contributor Author

Only because you hadn't approved the same changes in the other file. They are approved now, so I have removed the 'do not merge' tag. I am happy to merge when you are.

@weissi
Copy link
Member

weissi commented Mar 31, 2019

@swift-nio-bot test this please

Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@weissi weissi merged commit 0c74dfb into apple:master Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants