Initial commit

master
fosanz 11 months ago
commit 802a699edf

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,23 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="10">
<item index="0" class="java.lang.String" itemvalue="requests-oauthlib" />
<item index="1" class="java.lang.String" itemvalue="Werkzeug" />
<item index="2" class="java.lang.String" itemvalue="Flask-Assets" />
<item index="3" class="java.lang.String" itemvalue="SQLAlchemy" />
<item index="4" class="java.lang.String" itemvalue="libsass" />
<item index="5" class="java.lang.String" itemvalue="requests" />
<item index="6" class="java.lang.String" itemvalue="Flask-SQLAlchemy" />
<item index="7" class="java.lang.String" itemvalue="Jinja2" />
<item index="8" class="java.lang.String" itemvalue="Flask-Login" />
<item index="9" class="java.lang.String" itemvalue="Flask" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.11 (TCPNetworking)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (TCPNetworking)" project-jdk-type="Python SDK" />
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TCPNetworking.iml" filepath="$PROJECT_DIR$/.idea/TCPNetworking.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,15 @@
import socket
host = '192.168.50.106'
port = 2000
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((host, port))
while True:
data = input('Enter data to send: ')
s.send(data.encode('utf-8'))
if data == 'exit':
break
data = s.recv(1024)
print('Received data: ', data.decode('utf-8'))

@ -0,0 +1,18 @@
import socket
host = ''
port = 2000
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((host, port))
s.listen()
conn, addr = s.accept()
with conn:
print('Connected by', addr)
while True:
data = conn.recv(1024)
if data == b'exit':
break
print('Received data: ', data)
conn.send(data + b' from server')
Loading…
Cancel
Save

Powered by INFORMATICA.FP.EDU.ES.