Python Forum
How to use a UDP server and client to setup a chat
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use a UDP server and client to setup a chat
#1
well i am just learning python and i know this is complicated... maybe... idk, but what i am trying to do is: lest say i want to talk to someone on another windows from my mac OS X and i want to use terminal to send a message to a udp server, and it sends the message to the other computer. kinda like a chat service. this is basically the way E-mail works. you send a message from client to server. then the server sends the entry from the first client to the second. I'm planning to setup on the MAC OS X  the server and a client and on the windows a client. and if i wanted to add more clients how would i do that?


so what i am trying to say is.

1. how do i setup a udp server and client
2. how to i make it where multiple clients can log into the server and see messages sent from one client to another?
3. be able to add more clients that can use the server


if you can't understand what I'm trying to make, lust let me know and i will try to clarify. remember I am currently running a mac and the command line is the same as a linux and I also have a windows 10 computer. I
Reply
#2
How much of this do you want to write yourself? If you use Twisted, you can have a basic udp client and server done very quickly.

A server doesn't have any clients at first. Clients connect to it, and register themselves as listeners. So adding a second client is exactly as difficult as adding the first.
Reply
#3
ok i plan not to do much in setting it up. my main thing I'm learning right now is C++ and ill get to python later. just trying to setup an echo server like listed on twisted... but it returns whats sent to other clients... the server is there to just allow people to connect to each other, and to send messages it received by clients to other clients... so was i want is for the clients to be able to write AND receive. how would i do that
(Mar-08-2017, 09:38 PM)nilamo Wrote: How much of this do you want to write yourself? If you use Twisted, you can have a basic udp client and server done very quickly. A server doesn't have any clients at first. Clients connect to it, and register themselves as listeners. So adding a second client is exactly as difficult as adding the first.


User has been warned for this post. Reason: Don't PM random members about your question. Follow up on your own thread, and read the help page about improving posts.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Networking Issues - Python GUI client and server connection always freezes Veritas_Vos_Liberabit24 0 679 Mar-21-2023, 03:18 AM
Last Post: Veritas_Vos_Liberabit24
  Setup host for consistent data transfer to client via TCP Gustav97 0 679 Jun-27-2022, 07:33 PM
Last Post: Gustav97
  creating python server and client in a pc kucingkembar 4 1,955 Nov-29-2021, 01:37 PM
Last Post: kucingkembar
  Real-Time output of server script on a client script. throwaway34 2 2,010 Oct-03-2021, 09:37 AM
Last Post: ibreeden
  How to take the tar backup files form remote server to local server sivareddy 0 1,871 Jul-14-2021, 01:32 PM
Last Post: sivareddy
Question download watsapp chat Orliv 1 1,737 Jan-26-2021, 07:01 PM
Last Post: Larz60+
  Python sockets : Client sending to the server nico31780 0 2,272 May-17-2020, 07:56 PM
Last Post: nico31780
  Chat bot akanowhere 16 5,722 Dec-12-2019, 02:47 PM
Last Post: akanowhere
  client-server pictures mcgrim 4 2,913 Oct-25-2019, 09:53 PM
Last Post: micseydel
  I am trying to send message in youtube live chat stylohunk 1 2,550 Jun-08-2019, 04:06 PM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020