-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
Though we didn't explore this for TCP, in addition to selecting the destination port, both TCP and UDP can set their _source_ port. | ||
We'll practice that here --- you can set the source port with `s.bind` on the socket, exactly how a server does it to set their listening port. | ||
Read the source code of `/challenge/run` to see what source port you'll need! | ||
|
||
---- | ||
|
||
**NOTE:** | ||
You must set the source port _before_ sending data! | ||
Otherwise, Linux will pick a random source port (the default behavior, when `bind` is not called). |