Server and client on Raspberry Pi

In summary, the conversation discusses connecting multiple clients to a server in Python using socket functions. The speaker mentions that they are working on a project with 5 clients and 1 server, where the server will open a connection socket and run a specific task when a client is connected. They also mention that other clients will need to wait until the task of the first client is finished before connecting and running their own task. The speaker asks for advice on how to do this using socket functions and is directed towards zeromq, a library designed for connecting machines across a network. The conversation ends with the speaker expressing gratitude for the help and mentioning the use of a queue to hold clients while waiting for the first client to finish their task.
  • #1
mizieahmad
16
1
May I know how to make multiple client connected to a server in python language. I want to communicate one Raspberry Pi to other Raspberry Pi using the python. What I knew, it need to used function socket. i will explain my project. There are contain 5 clients and 1 server. A server will open the connection socket. when a client1 connected to it, it will run the specific task. If other client such as client 2 want to connected to the server and run the specific task, it need to wait until the task of client 1 is not finished. Same step for client 3,4 and 5.

May i know how to do that, just give me the idea or what the socket function that i need to used. I appreciate your reply.
 
Technology news on Phys.org
  • #3
Thank to everyone for helping me to solve the problems. Now, can got the solution. By using the queue, it make the server hold the other client when a client is not finishing its work.
 
  • #5
Sorry my mistake, thanks to Jedishrfu for helping me solve this problem. Thank you for your time and attention.
 

1. What is a server and client on Raspberry Pi?

A server is a computer or program that provides services, resources, and data to other computers or programs, known as clients. A client on Raspberry Pi is a device or program that connects to a server to access and use its services and resources.

2. What is the difference between a server and client on Raspberry Pi?

The main difference between a server and client on Raspberry Pi is their role in the network. A server is responsible for providing services and resources, while a client is responsible for accessing and using those services and resources from the server. Additionally, a server typically has more processing power and memory compared to a client.

3. What are some examples of servers and clients on Raspberry Pi?

Examples of servers on Raspberry Pi include web servers, file servers, and media servers. Clients on Raspberry Pi can include web browsers, email clients, and media players.

4. How do I set up a server and client on Raspberry Pi?

To set up a server and client on Raspberry Pi, you will need to install the necessary software for each role. This may include a server operating system, such as Raspbian, and server software, such as Apache for web serving. For the client, you may need to install a web browser or media player, depending on the type of client you want to use.

5. Can I use Raspberry Pi as both a server and client?

Yes, Raspberry Pi can be used as both a server and client. It has enough processing power and memory to handle both roles simultaneously. However, it is important to note that running multiple servers and clients on Raspberry Pi may affect its performance and may require additional resources.

Similar threads

  • Programming and Computer Science
Replies
7
Views
489
  • Programming and Computer Science
Replies
28
Views
735
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
2
Replies
39
Views
5K
  • Programming and Computer Science
Replies
1
Views
986
Replies
7
Views
243
  • Programming and Computer Science
Replies
18
Views
3K
  • Computing and Technology
Replies
2
Views
743
  • Programming and Computer Science
Replies
3
Views
1K
Back
Top