Python Forum
Writing socket server - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Writing socket server (/thread-24622.html)



Writing socket server - NewPy_thwan_Programmer - Feb-23-2020

Hello :)
I'm new to python and i wanted to try building a server.
I managed to write files and pass data. but on one computer.
I want to do something like sql. (not saving important or private details.)
my question is, if i want to make it a class. like FirebaseDatabase.
how do i make it global? so I can import the class from different computers ?
and if i do that, do i really need sockets?
cause if i do something from the client side like:
my_server.writeFileToDb():
and passing it a dictionary or something. will it save it on the pc that have the full server class ?
and if it will, why i need sockets?

or the best way to do it is to connect to the server with binding the client socket to the server socket?
and getting the data and passing data with statements ? like sql works?
(again, not trying to build any thing sophisticated just a simple server to write false data, and basically learning)