Home > Mobile >  Socket server and client on the same time
Socket server and client on the same time

Time:11-10

I want to know if it’s possible de make a server and client in the same time using sockets

The goal is to do a bidirectional file transfer from client to server and from server to client using python socket

Any one have an idea ?

CodePudding user response:

You still only need a Server and a Client. The server is also able to read and process data that the client is sending.

CodePudding user response:

Sockets are bidirectional and server can await clients for long time, you can connect by client when need it and then disconnect. But if you want to start socket server only when you transferring files you can make following: client can tell server to start socket server by HTTP request and after that client can connect as socket client.

  • Related