Browse Source

29_okt_2019

master
Irak 5 years ago
parent
commit
119c016aae
3 changed files with 163 additions and 22 deletions
  1. 148
    7
      .idea/workspace.xml
  2. 10
    8
      client_app.py
  3. 5
    7
      server_app.py

+ 148
- 7
.idea/workspace.xml View File

<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="8ccc1b48-23e0-4e30-98d2-f52b8f3df07a" name="Default Changelist" comment="" />
<list default="true" id="8ccc1b48-23e0-4e30-98d2-f52b8f3df07a" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/client_app.py" beforeDir="false" afterPath="$PROJECT_DIR$/client_app.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/server_app.py" beforeDir="false" afterPath="$PROJECT_DIR$/server_app.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/Web_Engineering$client_app.coverage" NAME="client_app Coverage Results" MODIFIED="1572354917832" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Web_Engineering$server_app.coverage" NAME="server_app Coverage Results" MODIFIED="1572354915450" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="client_app.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/client_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="15" selection-start-line="14" selection-start-column="15" selection-end-line="14" selection-end-column="15" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="server_app.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/server_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
<list> <list>
</list> </list>
</option> </option>
</component> </component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/server_app.py" />
<option value="$PROJECT_DIR$/client_app.py" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="384" />
<option name="y" value="282" />
<option name="width" value="1400" />
<option name="height" value="1000" />
</component>
<component name="ProjectId" id="1SEugOsGOB8hi2cwkLDRm5UoPiR" /> <component name="ProjectId" id="1SEugOsGOB8hi2cwkLDRm5UoPiR" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Web_Engineering" type="b2602c69:ProjectViewProjectNode" />
<item name="Web_Engineering" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component> </component>
<component name="RunDashboard"> <component name="RunDashboard">
<option name="ruleStates"> <option name="ruleStates">
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" /> <option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration> </configuration>
<configuration name="server_app" type="PythonConfigurationType" factoryName="Python" temporary="true"> <configuration name="server_app" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Web_Engineering" /> <module name="Web_Engineering" />
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" /> <option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration> </configuration>
<list>
<item itemvalue="Python.client_app" />
<item itemvalue="Python.server_app" />
</list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python.server_app" /> <item itemvalue="Python.server_app" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager">
<frame x="384" y="282" width="1400" height="1000" extended-state="0" />
<layout>
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<window_info anchor="bottom" id="Database Changes" order="9" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="8" />
<window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32937366" />
<window_info anchor="bottom" id="Terminal" order="11" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="right" id="Database" order="4" />
<window_info anchor="right" id="SciView" order="3" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" /> <option name="version" value="1" />
</component> </component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl"> <component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/Web_Engineering$client_app.coverage" NAME="client_app Coverage Results" MODIFIED="1571142046824" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/Web_Engineering$client_app.coverage" NAME="client_app Coverage Results" MODIFIED="1571142046824" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/Web_Engineering$server_app.coverage" NAME="server_app Coverage Results" MODIFIED="1571142041364" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/Web_Engineering$server_app.coverage" NAME="server_app Coverage Results" MODIFIED="1571142041364" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component> </component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/client_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="15" selection-start-line="14" selection-start-column="15" selection-end-line="14" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/server_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="41" lean-forward="true" selection-start-line="10" selection-start-column="41" selection-end-line="10" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" lean-forward="true" selection-start-line="1" selection-end-line="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="15" selection-start-line="14" selection-start-column="15" selection-end-line="14" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/server_app.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
</state>
</provider>
</entry>
</component>
</project> </project>

+ 10
- 8
client_app.py View File

s = socket.socket() s = socket.socket()
host = socket.gethostname() host = socket.gethostname()
port = 61233 port = 61233
eingabe = " "
while eingabe != "STOP":
eingabe = input("Bitte String eingeben ")
s.connect((host, port))
s.send(eingabe.encode("utf-8"))
bytes = s.recv(1024)
print(bytes.decode("utf-8"))
s.close()
s.connect((host, port))
while True:
message = input("Bitte String eingeben ")
s.send(message.encode("utf-8"))
if message == "STOP":
break
data = s.recv(1024).decode()
print(data)
s.close()

+ 5
- 7
server_app.py View File

s.bind((host, port)) s.bind((host, port))
s.listen() s.listen()
(connection, addr) = s.accept()
print("Verbindung von ", addr)
while True: while True:
(connection, addr) = s.accept()
print("Verbindung von ", addr)
data = connection.recv(1024)
data = data.decode("utf-8")
data = connection.recv(1024).decode()
#print("Data = %s" % (data)) #print("Data = %s" % (data))
data = data.upper()
#data = "hi" #data = "hi"
connection.send(data.encode("utf-8"))
connection.close()
connection.send(data.upper().encode())
connection.close()

Loading…
Cancel
Save