Skip to content
View Kami-art-sgd's full-sized avatar

Block or report Kami-art-sgd

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Kami-art-sgd/README.md

-``` import socket import threading

class MessagingSystem: def init(self): self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.client_socket.connect(("localhost", 12345)) self.username = input("Enter your username: ")

def send_message(self):
	message = input("Enter your message: ")
	self.client_socket.send(f"{self.username}: {message}".encode())

def receive_message(self):
	while True:
		message = self.client_socket.recv(1024).decode()
		print("New message received:", message)

def run(self):
	send_thread = threading.Thread(target=self.send_message)
	receive_thread = threading.Thread(target=self.receive_message)
	send_thread.start()
	receive_thread.start()

messaging_system = MessagingSystem() messaging_system.run()

- πŸ‘€ I’m interested in ...
- 🌱 I’m currently learning ...
- πŸ’žοΈ I’m looking to collaborate on ...
- πŸ“« How to reach me ...
- πŸ˜„ Pronouns: ...
- ⚑ Fun fact: ...

<!---
Kami-art-sgd/Kami-art-sgd is a ✨ special ✨ repository because its `README.md` (this file) appears on your GitHub profile.
You can click the Preview link to take a look at your changes.
--->

Popular repositories Loading

  1. Al Al Public

  2. Kami-art-sgd Kami-art-sgd Public

    Config files for my GitHub profile.