-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begun socket client write down (no code yet, mostly doe the structure…
… on paper up to now)
- Loading branch information
Showing
6 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,28 @@ | ||
from typing import Protocol | ||
import protocol | ||
|
||
|
||
class SocketCom: | ||
""" | ||
SocketCom is the single socket communication | ||
""" | ||
def __init__(self, remoteServer, port, beginTrigger=b'\xff', endTrigger=b'\xfe'): | ||
inBuffer = Protocol(beginTrigger, endTrigger) | ||
|
||
|
||
class ControllerFactory: | ||
""" | ||
It's our "Controller loop" in sockets. | ||
It may be useful having a controller loop for the socket | ||
communication too so that we can create SocketComs like a | ||
factory pattern. | ||
Why doing so? | ||
If we need an high-throughput, we can | ||
""" | ||
|
||
def __init__(self, remoteServer, portRange=[8000, 9000]): | ||
""" | ||
portRange is useful in case i want to decide on which ports | ||
range i want my sockets to work on! | ||
""" | ||
pass |
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