-
Notifications
You must be signed in to change notification settings - Fork 35
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
11 changed files
with
128 additions
and
94 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 |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
""" | ||
|
||
|
||
from .address import Address | ||
from .click_types import ( | ||
ClickTypeIp4Address, | ||
ClickTypeIp4Host, | ||
|
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
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
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
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
|
||
################################################################################ | ||
## ## | ||
## PyTCP - Python TCP/IP stack ## | ||
## Copyright (C) 2020-present Sebastian Majewski ## | ||
## ## | ||
## This program is free software: you can redistribute it and/or modify ## | ||
## it under the terms of the GNU General Public License as published by ## | ||
## the Free Software Foundation, either version 3 of the License, or ## | ||
## (at your option) any later version. ## | ||
## ## | ||
## This program is distributed in the hope that it will be useful, ## | ||
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## | ||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## | ||
## GNU General Public License for more details. ## | ||
## ## | ||
## You should have received a copy of the GNU General Public License ## | ||
## along with this program. If not, see <https://www.gnu.org/licenses/>. ## | ||
## ## | ||
## Author's email: [email protected] ## | ||
## Github repository: https://github.com/ccie18643/PyTCP ## | ||
## ## | ||
################################################################################ | ||
|
||
|
||
""" | ||
Module contains class representing the Socket identificator. | ||
pytcp/lib/socket.py | ||
ver 3.0.2 | ||
""" | ||
|
||
|
||
from __future__ import annotations | ||
|
||
from dataclasses import dataclass | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from net_addr import Address | ||
|
||
from .socket import AddressFamily, SocketType | ||
|
||
|
||
@dataclass(frozen=True) | ||
class SocketId: | ||
""" | ||
Store the Socket identificator data. | ||
""" | ||
|
||
address_family: AddressFamily | ||
socket_type: SocketType | ||
local_address: Address | ||
local_port: int | ||
remote_address: Address | ||
remote_port: int |
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
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
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
Oops, something went wrong.